]> Raphaël G. Git Repositories - airbundle/blob - Entity/Application.php
Fix flash message translation
[airbundle] / Entity / Application.php
1 <?php
2
3 namespace Rapsys\AirBundle\Entity;
4
5 /**
6 * Application
7 */
8 class Application {
9 /**
10 * @var integer
11 */
12 private $id;
13
14 /**
15 * @var \DateTime
16 */
17 private $created;
18
19 /**
20 * @var \DateTime
21 */
22 private $updated;
23
24
25 //TODO: ajouter un champ score à replir lors de l'attribution d'une session
26 //XXX: champ float avec une bonne capacité en décimale
27
28
29 /**
30 * @var \Doctrine\Common\Collections\Collection
31 */
32 private $votes;
33
34 /**
35 * @var \Rapsys\AirBundle\Entity\Session
36 */
37 private $session;
38
39 /**
40 * @var \Rapsys\AirBundle\Entity\User
41 */
42 private $user;
43
44 /**
45 * Constructor
46 */
47 public function __construct() {
48 $this->votes = new \Doctrine\Common\Collections\ArrayCollection();
49 }
50
51 /**
52 * Get id
53 *
54 * @return integer
55 */
56 public function getId() {
57 return $this->id;
58 }
59
60 /**
61 * Set created
62 *
63 * @param \DateTime $created
64 *
65 * @return Application
66 */
67 public function setCreated($created) {
68 $this->created = $created;
69
70 return $this;
71 }
72
73 /**
74 * Get created
75 *
76 * @return \DateTime
77 */
78 public function getCreated() {
79 return $this->created;
80 }
81
82 /**
83 * Set updated
84 *
85 * @param \DateTime $updated
86 *
87 * @return Application
88 */
89 public function setUpdated($updated) {
90 $this->updated = $updated;
91
92 return $this;
93 }
94
95 /**
96 * Get updated
97 *
98 * @return \DateTime
99 */
100 public function getUpdated() {
101 return $this->updated;
102 }
103
104 /**
105 * Add vote
106 *
107 * @param \Rapsys\AirBundle\Entity\Vote $vote
108 *
109 * @return Application
110 */
111 public function addVote(\Rapsys\AirBundle\Entity\Vote $vote) {
112 $this->votes[] = $vote;
113
114 return $this;
115 }
116
117 /**
118 * Remove vote
119 *
120 * @param \Rapsys\AirBundle\Entity\Vote $vote
121 */
122 public function removeVote(\Rapsys\AirBundle\Entity\Vote $vote) {
123 $this->votes->removeElement($vote);
124 }
125
126 /**
127 * Get votes
128 *
129 * @return \Doctrine\Common\Collections\Collection
130 */
131 public function getVotes() {
132 return $this->votes;
133 }
134
135 /**
136 * Set session
137 *
138 * @param \Rapsys\AirBundle\Entity\Session $session
139 *
140 * @return Application
141 */
142 public function setSession(\Rapsys\AirBundle\Entity\Session $session = null) {
143 $this->session = $session;
144
145 return $this;
146 }
147
148 /**
149 * Get session
150 *
151 * @return \Rapsys\AirBundle\Entity\Session
152 */
153 public function getSession() {
154 return $this->session;
155 }
156
157 /**
158 * Set user
159 *
160 * @param \Rapsys\AirBundle\Entity\User $user
161 *
162 * @return Application
163 */
164 public function setUser(\Rapsys\AirBundle\Entity\User $user = null) {
165 $this->user = $user;
166
167 return $this;
168 }
169
170 /**
171 * Get user
172 *
173 * @return \Rapsys\AirBundle\Entity\User
174 */
175 public function getUser() {
176 return $this->user;
177 }
178 }