Correction sur les modèles A et B
[zf2.biz/galerie.git] / module / Galerie / src / Galerie / Model / GalerieB.php
1 <?php
2
3 namespace Galerie\Model;
4
5 class GalerieB
6 {
7     protected $id;
8     protected $id_user;
9     protected $name;
10     protected $description;
11     protected $created;
12     protected $updated;
13
14
15     public function exchangeArray($data)
16     {
17         $this->id = isset($data['id']) ? $data['id'] : null;
18         $this->id_user = isset($data['is_user']) ? $data['id_user'] : null;
19         $this->name = isset($data['name']) ? $data['name'] : null;
20         $this->description = isset($data['description']) ? $data['description'] : null;
21         $this->created = isset($data['created']) ? $data['created'] : null;
22         $this->updated = isset($data['updated']) ? $data['updated'] : null;
23     }
24
25     public function toArray()
26     {
27         return array(
28             'id' => $this->id,
29             'is_user' => $this->id_user,
30             'name' => $this->name,
31             'description' => $this->description,
32             'created' => $this->created,
33             'updated' => $this->updated,
34         );
35     }
36
37
38     public function getId()
39     {
40         return $this->id;
41     }
42
43     public function setId($id)
44     {
45         $this->id = $id;
46         return $this;
47     }
48
49     public function getIdUser()
50     {
51         return $this->id_user;
52     }
53
54     public function setIdUser($id_user)
55     {
56         $this->id_user = $id_user;
57         return $this;
58     }
59
60     public function getName()
61     {
62         return $this->name;
63     }
64
65     public function setName($name)
66     {
67         $this->name = $name;
68         return $this;
69     }
70
71     public function getDescription()
72     {
73         return $this->description;
74     }
75
76     public function setDescription ($description)
77     {
78         $this-> description = $description;
79         return $this;
80     }
81
82     public function getCreated()
83     {
84         return $this->created;
85     }
86
87     public function setCreated($created)
88     {
89         $this->created = $created;
90         return $this;
91     }
92
93     public function getUpdated()
94     {
95         return $this->updated;
96     }
97
98     public function setUpdated($updated)
99     {
100         $this->updated = $updated;
101         return $this;
102     }
103
104 }