1 <?php 
declare(strict_types
=1); 
   4  * this file is part of the rapsys packbundle package. 
   6  * (c) raphaël gertz <symfony@rapsys.eu> 
   8  * for the full copyright and license information, please view the license 
   9  * file that was distributed with this source code. 
  12 namespace Rapsys\AirBundle\Entity
; 
  14 use Doctrine\Common\Collections\ArrayCollection
; 
  16 use Rapsys\UserBundle\Entity\User 
as BaseUser
; 
  18 class User 
extends BaseUser 
{ 
  45          * @var ArrayCollection 
  47         private $applications; 
  50          * @var ArrayCollection 
  55          * @var ArrayCollection 
  60          * @var ArrayCollection 
  65          * @var ArrayCollection 
  70          * @var ArrayCollection 
  72         private $subscriptions; 
  77          * @param string $mail The user mail 
  79         public function __construct(string $mail) { 
  80                 //Call parent constructor 
  81                 parent
::__construct($mail); 
  85                 $this->country 
= null; 
  87                 $this->pseudonym 
= null; 
  88                 $this->zipcode 
= null; 
  91                 $this->applications 
= new ArrayCollection(); 
  92                 $this->dances 
= new ArrayCollection(); 
  93                 $this->locations 
= new ArrayCollection(); 
  94                 $this->snippets 
= new ArrayCollection(); 
  95                 $this->subscribers 
= new ArrayCollection(); 
  96                 $this->subscriptions 
= new ArrayCollection(); 
 102          * @param Country $country 
 106         public function setCountry(Country 
$country) { 
 107                 $this->country 
= $country; 
 117         public function getCountry() { 
 118                 return $this->country
; 
 124          * @param string $city 
 128         public function setCity(?string $city): User 
{ 
 139         public function getCity(): ?string { 
 146          * @param string $phone 
 150         public function setPhone(?string $phone): User 
{ 
 151                 $this->phone 
= $phone; 
 161         public function getPhone(): ?string { 
 168          * @param string $pseudonym 
 172         public function setPseudonym(?string $pseudonym): User 
{ 
 173                 $this->pseudonym 
= $pseudonym; 
 183         public function getPseudonym(): ?string { 
 184                 return $this->pseudonym
; 
 190          * @param string $zipcode 
 194         public function setZipcode(?string $zipcode): User 
{ 
 195                 $this->zipcode 
= $zipcode; 
 205         public function getZipcode(): ?string { 
 206                 return $this->zipcode
; 
 212          * @param Application $application 
 216         public function addApplication(Application 
$application): User 
{ 
 217                 $this->applications
[] = $application; 
 225          * @param Application $application 
 227         public function removeApplication(Application 
$application): bool { 
 228                 return $this->applications
->removeElement($application); 
 234          * @return ArrayCollection 
 236         public function getApplications(): ArrayCollection 
{ 
 237                 return $this->applications
; 
 243          * @param Dance $dance 
 247         public function addDance(Dance 
$dance): User 
{ 
 248                 $this->dances
[] = $dance; 
 256          * @param Dance $dance 
 260         public function removeDance(Dance 
$dance): bool { 
 261                 return $this->dances
->removeElement($dance); 
 267          * @return ArrayCollection 
 269         public function getDances(): ArrayCollection 
{ 
 270                 return $this->dances
; 
 276          * @param Location $location 
 280         public function addLocation(Location 
$location): User 
{ 
 281                 $this->locations
[] = $location; 
 289          * @param Location $location 
 291         public function removeLocation(Location 
$location): bool { 
 292                 return $this->locations
->removeElement($location); 
 298          * @return ArrayCollection 
 300         public function getLocations(): ArrayCollection 
{ 
 301                 return $this->locations
; 
 307          * @param Snippet $snippet 
 311         public function addSnippet(Snippet 
$snippet): User 
{ 
 312                 $this->snippets
[] = $snippet; 
 320          * @param Snippet $snippet 
 322         public function removeSnippet(Snippet 
$snippet): bool { 
 323                 return $this->snippets
->removeElement($snippet); 
 329          * @return ArrayCollection 
 331         public function getSnippets(): ArrayCollection 
{ 
 332                 return $this->snippets
; 
 338          * @param User $subscriber 
 342         public function addSubscriber(User 
$subscriber): User 
{ 
 343                 $this->subscribers
[] = $subscriber; 
 351          * @param User $subscriber 
 353         public function removeSubscriber(User 
$subscriber): bool { 
 354                 return $this->subscribers
->removeElement($subscriber); 
 360          * @return ArrayCollection 
 362         public function getSubscribers(): ArrayCollection 
{ 
 363                 return $this->subscribers
; 
 369          * @param User $subscription 
 373         public function addSubscription(User 
$subscription): User 
{ 
 374                 $this->subscriptions
[] = $subscription; 
 380          * Remove subscription 
 382          * @param User $subscription 
 384         public function removeSubscription(User 
$subscription): bool { 
 385                 return $this->subscriptions
->removeElement($subscription); 
 391          * @return ArrayCollection 
 393         public function getSubscriptions(): ArrayCollection 
{ 
 394                 return $this->subscriptions
;