]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/User.php
Create monde morning as before session
[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 $subscribers;
27
28 /**
29 * @var \Doctrine\Common\Collections\Collection
30 */
31 private $subscriptions;
32
33 /**
34 * @var \Doctrine\Common\Collections\Collection
35 */
36 private $snippets;
37
38 /**
39 * Constructor
40 */
41 public function __construct() {
42 //Call parent constructor
43 parent::__construct();
44
45 //Set collections
46 $this->applications = new \Doctrine\Common\Collections\ArrayCollection();
47 $this->subscribers = new \Doctrine\Common\Collections\ArrayCollection();
48 $this->subscriptions = new \Doctrine\Common\Collections\ArrayCollection();
49 $this->snippets = new \Doctrine\Common\Collections\ArrayCollection();
50 }
51
52 /**
53 * Set phone
54 *
55 * @param string $phone
56 *
57 * @return User
58 */
59 public function setPhone($phone) {
60 $this->phone = $phone;
61
62 return $this;
63 }
64
65 /**
66 * Get phone
67 *
68 * @return string
69 */
70 public function getPhone() {
71 return $this->phone;
72 }
73
74 /**
75 * Set donation
76 *
77 * @param string $donation
78 *
79 * @return User
80 */
81 public function setDonation($donation) {
82 $this->donation = $donation;
83
84 return $this;
85 }
86
87 /**
88 * Get donation
89 *
90 * @return string
91 */
92 public function getDonation() {
93 return $this->donation;
94 }
95
96 /**
97 * Set site
98 *
99 * @param string $site
100 *
101 * @return User
102 */
103 public function setSite($site) {
104 $this->site = $site;
105
106 return $this;
107 }
108
109 /**
110 * Get site
111 *
112 * @return string
113 */
114 public function getSite() {
115 return $this->site;
116 }
117
118 /**
119 * Add application
120 *
121 * @param \Rapsys\AirBundle\Entity\Application $application
122 *
123 * @return User
124 */
125 public function addApplication(Application $application) {
126 $this->applications[] = $application;
127
128 return $this;
129 }
130
131 /**
132 * Remove application
133 *
134 * @param \Rapsys\AirBundle\Entity\Application $application
135 */
136 public function removeApplication(Application $application) {
137 $this->applications->removeElement($application);
138 }
139
140 /**
141 * Get applications
142 *
143 * @return \Doctrine\Common\Collections\Collection
144 */
145 public function getApplications() {
146 return $this->applications;
147 }
148
149 /**
150 * Add subscriber
151 *
152 * @param \Rapsys\AirBundle\Entity\User $subscriber
153 *
154 * @return User
155 */
156 public function addSubscriber(User $subscriber) {
157 $this->subscribers[] = $subscriber;
158
159 return $this;
160 }
161
162 /**
163 * Remove subscriber
164 *
165 * @param \Rapsys\AirBundle\Entity\User $subscriber
166 */
167 public function removeSubscriber(User $subscriber) {
168 $this->subscribers->removeElement($subscriber);
169 }
170
171 /**
172 * Get subscribers
173 *
174 * @return \Doctrine\Common\Collections\Collection
175 */
176 public function getSubscribers() {
177 return $this->subscribers;
178 }
179
180 /**
181 * Add subscription
182 *
183 * @param \Rapsys\AirBundle\Entity\User $subscription
184 *
185 * @return User
186 */
187 public function addSubscription(User $subscription) {
188 $this->subscriptions[] = $subscription;
189
190 return $this;
191 }
192
193 /**
194 * Remove subscription
195 *
196 * @param \Rapsys\AirBundle\Entity\User $subscription
197 */
198 public function removeSubscription(User $subscription) {
199 $this->subscriptions->removeElement($subscription);
200 }
201
202 /**
203 * Get subscriptions
204 *
205 * @return \Doctrine\Common\Collections\Collection
206 */
207 public function getSubscriptions() {
208 return $this->subscriptions;
209 }
210
211 /**
212 * Add snippet
213 *
214 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
215 *
216 * @return User
217 */
218 public function addSnippet(Snippet $snippet) {
219 $this->snippets[] = $snippet;
220
221 return $this;
222 }
223
224 /**
225 * Remove snippet
226 *
227 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
228 */
229 public function removeSnippet(Snippet $snippet) {
230 $this->snippets->removeElement($snippet);
231 }
232
233 /**
234 * Get snippets
235 *
236 * @return \Doctrine\Common\Collections\Collection
237 */
238 public function getSnippets() {
239 return $this->snippets;
240 }
241 }