]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/Application.php
Add short field and related methods
[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 * @var \Doctrine\Common\Collections\Collection
26 */
27 private $votes;
28
29 /**
30 * @var \Rapsys\AirBundle\Entity\Session
31 */
32 private $session;
33
34 /**
35 * @var \Rapsys\AirBundle\Entity\User
36 */
37 private $user;
38
39 /**
40 * Constructor
41 */
42 public function __construct() {
43 $this->votes = new \Doctrine\Common\Collections\ArrayCollection();
44 }
45
46 /**
47 * Get id
48 *
49 * @return integer
50 */
51 public function getId() {
52 return $this->id;
53 }
54
55 /**
56 * Set created
57 *
58 * @param \DateTime $created
59 *
60 * @return Application
61 */
62 public function setCreated($created) {
63 $this->created = $created;
64
65 return $this;
66 }
67
68 /**
69 * Get created
70 *
71 * @return \DateTime
72 */
73 public function getCreated() {
74 return $this->created;
75 }
76
77 /**
78 * Set updated
79 *
80 * @param \DateTime $updated
81 *
82 * @return Application
83 */
84 public function setUpdated($updated) {
85 $this->updated = $updated;
86
87 return $this;
88 }
89
90 /**
91 * Get updated
92 *
93 * @return \DateTime
94 */
95 public function getUpdated() {
96 return $this->updated;
97 }
98
99 /**
100 * Add vote
101 *
102 * @param \Rapsys\AirBundle\Entity\Vote $vote
103 *
104 * @return Application
105 */
106 public function addVote(\Rapsys\AirBundle\Entity\Vote $vote) {
107 $this->votes[] = $vote;
108
109 return $this;
110 }
111
112 /**
113 * Remove vote
114 *
115 * @param \Rapsys\AirBundle\Entity\Vote $vote
116 */
117 public function removeVote(\Rapsys\AirBundle\Entity\Vote $vote) {
118 $this->votes->removeElement($vote);
119 }
120
121 /**
122 * Get votes
123 *
124 * @return \Doctrine\Common\Collections\Collection
125 */
126 public function getVotes() {
127 return $this->votes;
128 }
129
130 /**
131 * Set session
132 *
133 * @param \Rapsys\AirBundle\Entity\Session $session
134 *
135 * @return Application
136 */
137 public function setSession(\Rapsys\AirBundle\Entity\Session $session = null) {
138 $this->session = $session;
139
140 return $this;
141 }
142
143 /**
144 * Get session
145 *
146 * @return \Rapsys\AirBundle\Entity\Session
147 */
148 public function getSession() {
149 return $this->session;
150 }
151
152 /**
153 * Set user
154 *
155 * @param \Rapsys\AirBundle\Entity\User $user
156 *
157 * @return Application
158 */
159 public function setUser(\Rapsys\AirBundle\Entity\User $user = null) {
160 $this->user = $user;
161
162 return $this;
163 }
164
165 /**
166 * Get user
167 *
168 * @return \Rapsys\AirBundle\Entity\User
169 */
170 public function getUser() {
171 return $this->user;
172 }
173 }