]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/User.php
151f1a10f86662f4c2d9d1724c40bf9a4ad83321
[airbundle] / Entity / User.php
1 <?php
2
3 // src/Rapsys/AirBundle/Entity/User.php
4 namespace Rapsys\AirBundle\Entity;
5
6 use Rapsys\AirBundle\Entity\Application;
7 use Rapsys\AirBundle\Entity\Group;
8 use Rapsys\AirBundle\Entity\Link;
9 use Rapsys\AirBundle\Entity\Snippet;
10 use Rapsys\UserBundle\Entity\User as BaseUser;
11
12 class User extends BaseUser {
13 /**
14 * @var string
15 */
16 protected $phone;
17
18 /**
19 * @var \Doctrine\Common\Collections\Collection
20 */
21 private $applications;
22
23 /**
24 * @var \Doctrine\Common\Collections\Collection
25 */
26 private $locations;
27
28 /**
29 * @var \Doctrine\Common\Collections\Collection
30 */
31 private $snippets;
32
33 /**
34 * @var \Doctrine\Common\Collections\Collection
35 */
36 private $subscribers;
37
38 /**
39 * @var \Doctrine\Common\Collections\Collection
40 */
41 private $subscriptions;
42
43 /**
44 * Constructor
45 */
46 public function __construct() {
47 //Call parent constructor
48 parent::__construct();
49
50 //Set collections
51 $this->applications = new \Doctrine\Common\Collections\ArrayCollection();
52 $this->locations = new \Doctrine\Common\Collections\ArrayCollection();
53 $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
54 $this->subscribers = new \Doctrine\Common\Collections\ArrayCollection();
55 $this->subscriptions = new \Doctrine\Common\Collections\ArrayCollection();
56 }
57
58 /**
59 * Set phone
60 *
61 * @param string $phone
62 *
63 * @return User
64 */
65 public function setPhone($phone) {
66 $this->phone = $phone;
67
68 return $this;
69 }
70
71 /**
72 * Get phone
73 *
74 * @return string
75 */
76 public function getPhone() {
77 return $this->phone;
78 }
79
80 /**
81 * Set donation
82 *
83 * @param string $donation
84 *
85 * @return User
86 */
87 public function setDonation($donation) {
88 $this->donation = $donation;
89
90 return $this;
91 }
92
93 /**
94 * Get donation
95 *
96 * @return string
97 */
98 public function getDonation() {
99 return $this->donation;
100 }
101
102 /**
103 * Set site
104 *
105 * @param string $site
106 *
107 * @return User
108 */
109 public function setSite($site) {
110 $this->site = $site;
111
112 return $this;
113 }
114
115 /**
116 * Get site
117 *
118 * @return string
119 */
120 public function getSite() {
121 return $this->site;
122 }
123
124 /**
125 * Add application
126 *
127 * @param \Rapsys\AirBundle\Entity\Application $application
128 *
129 * @return User
130 */
131 public function addApplication(Application $application) {
132 $this->applications[] = $application;
133
134 return $this;
135 }
136
137 /**
138 * Remove application
139 *
140 * @param \Rapsys\AirBundle\Entity\Application $application
141 */
142 public function removeApplication(Application $application) {
143 $this->applications->removeElement($application);
144 }
145
146 /**
147 * Get applications
148 *
149 * @return \Doctrine\Common\Collections\Collection
150 */
151 public function getApplications() {
152 return $this->applications;
153 }
154
155 /**
156 * Add snippet
157 *
158 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
159 *
160 * @return User
161 */
162 public function addSnippet(Snippet $snippet) {
163 $this->snippets[] = $snippet;
164
165 return $this;
166 }
167
168 /**
169 * Remove snippet
170 *
171 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
172 */
173 public function removeSnippet(Snippet $snippet) {
174 $this->snippets->removeElement($snippet);
175 }
176
177 /**
178 * Get snippets
179 *
180 * @return \Doctrine\Common\Collections\Collection
181 */
182 public function getSnippets() {
183 return $this->snippets;
184 }
185
186 /**
187 * Add location
188 *
189 * @param \Rapsys\AirBundle\Entity\Location $location
190 *
191 * @return User
192 */
193 public function addLocation(Location $location) {
194 $this->locations[] = $location;
195
196 return $this;
197 }
198
199 /**
200 * Remove location
201 *
202 * @param \Rapsys\AirBundle\Entity\Location $location
203 */
204 public function removeLocation(Location $location) {
205 $this->locations->removeElement($location);
206 }
207
208 /**
209 * Get locations
210 *
211 * @return \Doctrine\Common\Collections\Collection
212 */
213 public function getLocations() {
214 return $this->locations;
215 }
216
217 /**
218 * Add subscriber
219 *
220 * @param \Rapsys\AirBundle\Entity\User $subscriber
221 *
222 * @return User
223 */
224 public function addSubscriber(User $subscriber) {
225 $this->subscribers[] = $subscriber;
226
227 return $this;
228 }
229
230 /**
231 * Remove subscriber
232 *
233 * @param \Rapsys\AirBundle\Entity\User $subscriber
234 */
235 public function removeSubscriber(User $subscriber) {
236 $this->subscribers->removeElement($subscriber);
237 }
238
239 /**
240 * Get subscribers
241 *
242 * @return \Doctrine\Common\Collections\Collection
243 */
244 public function getSubscribers() {
245 return $this->subscribers;
246 }
247
248 /**
249 * Add subscription
250 *
251 * @param \Rapsys\AirBundle\Entity\User $subscription
252 *
253 * @return User
254 */
255 public function addSubscription(User $subscription) {
256 $this->subscriptions[] = $subscription;
257
258 return $this;
259 }
260
261 /**
262 * Remove subscription
263 *
264 * @param \Rapsys\AirBundle\Entity\User $subscription
265 */
266 public function removeSubscription(User $subscription) {
267 $this->subscriptions->removeElement($subscription);
268 }
269
270 /**
271 * Get subscriptions
272 *
273 * @return \Doctrine\Common\Collections\Collection
274 */
275 public function getSubscriptions() {
276 return $this->subscriptions;
277 }
278 }