Rajout de l'export CSV
[zf2.biz/galerie.git] / module / Galerie / src / Galerie / Model / GalerieInfo.php
index 4adaacd..954ee71 100644 (file)
@@ -6,6 +6,7 @@ use Custom\Model\Entity;
 
 class GalerieInfo extends Entity
 {
+    public $id;
     public $name;
     public $description;
     public $username;
@@ -13,6 +14,7 @@ class GalerieInfo extends Entity
 
 
     protected $columns = array(
+        'id',
         'name',
         'description',
         'username',
@@ -25,4 +27,13 @@ class GalerieInfo extends Entity
     protected $primary_columns = array(
     );
 
+    public function csvFormat()
+    {
+        return $this->id
+            . ';' . $this->name
+            . ';' . $this->description
+            . ';' . $this->username
+            . ';' . $this->nb;
+    }
+
 }