Correction sur les modèles A et B
[zf2.biz/galerie.git] / module / Galerie / src / Galerie / Model / GalerieA.php
1 <?php
2
3 namespace Galerie\Model;
4
5 class GalerieA
6 {
7     public $id;
8     public $id_user;
9     public $name;
10     public $description;
11     public $created;
12     public $updated;
13
14     public function exchangeArray($data)
15     {
16         $this->id = isset($data['id']) ? $data['id'] : null;
17         $this->id_user = isset($data['is_user']) ? $data['id_user'] : null;
18         $this->name = isset($data['name']) ? $data['name'] : null;
19         $this->description = isset($data['description']) ? $data['description'] : null;
20         $this->created = isset($data['created']) ? $data['created'] : null;
21         $this->updated = isset($data['updated']) ? $data['updated'] : null;
22     }
23
24     public function toArray()
25     {
26         return array(
27             'id' => $this->id,
28             'is_user' => $this->id_user,
29             'name' => $this->name,
30             'description' => $this->description,
31             'created' => $this->created,
32             'updated' => $this->updated,
33         );
34     }
35
36 }