3 // src/Rapsys/AirBundle/Entity/User.php
4 namespace Rapsys\AirBundle\Entity
;
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
;
12 class User
extends BaseUser
{
19 * @var \Doctrine\Common\Collections\Collection
21 private $applications;
24 * @var \Doctrine\Common\Collections\Collection
29 * @var \Doctrine\Common\Collections\Collection
34 * @var \Doctrine\Common\Collections\Collection
39 * @var \Doctrine\Common\Collections\Collection
41 private $subscriptions;
46 * @param string $mail The user mail
48 public function __construct(string $mail) {
49 //Call parent constructor
50 parent
::__construct($mail);
53 $this->applications
= new \Doctrine\Common\Collections\
ArrayCollection();
54 $this->locations
= new \Doctrine\Common\Collections\
ArrayCollection();
55 $this->snippets
= new \Doctrine\Common\Collections\
ArrayCollection();
56 $this->subscribers
= new \Doctrine\Common\Collections\
ArrayCollection();
57 $this->subscriptions
= new \Doctrine\Common\Collections\
ArrayCollection();
63 * @param string $phone
67 public function setPhone($phone) {
68 $this->phone
= $phone;
78 public function getPhone() {
85 * @param string $donation
89 public function setDonation($donation) {
90 $this->donation
= $donation;
100 public function getDonation() {
101 return $this->donation
;
107 * @param string $site
111 public function setSite($site) {
122 public function getSite() {
129 * @param \Rapsys\AirBundle\Entity\Application $application
133 public function addApplication(Application
$application) {
134 $this->applications
[] = $application;
142 * @param \Rapsys\AirBundle\Entity\Application $application
144 public function removeApplication(Application
$application) {
145 $this->applications
->removeElement($application);
151 * @return \Doctrine\Common\Collections\Collection
153 public function getApplications() {
154 return $this->applications
;
160 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
164 public function addSnippet(Snippet
$snippet) {
165 $this->snippets
[] = $snippet;
173 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
175 public function removeSnippet(Snippet
$snippet) {
176 $this->snippets
->removeElement($snippet);
182 * @return \Doctrine\Common\Collections\Collection
184 public function getSnippets() {
185 return $this->snippets
;
191 * @param \Rapsys\AirBundle\Entity\Location $location
195 public function addLocation(Location
$location) {
196 $this->locations
[] = $location;
204 * @param \Rapsys\AirBundle\Entity\Location $location
206 public function removeLocation(Location
$location) {
207 $this->locations
->removeElement($location);
213 * @return \Doctrine\Common\Collections\Collection
215 public function getLocations() {
216 return $this->locations
;
222 * @param \Rapsys\AirBundle\Entity\User $subscriber
226 public function addSubscriber(User
$subscriber) {
227 $this->subscribers
[] = $subscriber;
235 * @param \Rapsys\AirBundle\Entity\User $subscriber
237 public function removeSubscriber(User
$subscriber) {
238 $this->subscribers
->removeElement($subscriber);
244 * @return \Doctrine\Common\Collections\Collection
246 public function getSubscribers() {
247 return $this->subscribers
;
253 * @param \Rapsys\AirBundle\Entity\User $subscription
257 public function addSubscription(User
$subscription) {
258 $this->subscriptions
[] = $subscription;
264 * Remove subscription
266 * @param \Rapsys\AirBundle\Entity\User $subscription
268 public function removeSubscription(User
$subscription) {
269 $this->subscriptions
->removeElement($subscription);
275 * @return \Doctrine\Common\Collections\Collection
277 public function getSubscriptions() {
278 return $this->subscriptions
;