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\AirBundle\Entity\Application
; 
  17 use Rapsys\AirBundle\Entity\Group
; 
  18 use Rapsys\AirBundle\Entity\Link
; 
  19 use Rapsys\AirBundle\Entity\Snippet
; 
  20 use Rapsys\UserBundle\Entity\User 
as BaseUser
; 
  22 class User 
extends BaseUser 
{ 
  44          * @var ArrayCollection 
  46         private $applications; 
  49          * @var ArrayCollection 
  54          * @var ArrayCollection 
  59          * @var ArrayCollection 
  64          * @var ArrayCollection 
  69          * @var ArrayCollection 
  71         private $subscriptions; 
  76          * @param string $mail The user mail 
  78         public function __construct(string $mail) { 
  79                 //Call parent constructor 
  80                 parent
::__construct($mail); 
  83                 $this->applications 
= new ArrayCollection(); 
  84                 $this->dances 
= new ArrayCollection(); 
  85                 $this->locations 
= new ArrayCollection(); 
  86                 $this->snippets 
= new ArrayCollection(); 
  87                 $this->subscribers 
= new ArrayCollection(); 
  88                 $this->subscriptions 
= new ArrayCollection(); 
  94          * @param string $donate 
  98         public function setDonate(?string $donate): User 
{ 
  99                 $this->donate 
= $donate; 
 109         public function getDonate(): ?string { 
 110                 return $this->donate
; 
 116          * @param string $link 
 120         public function setLink(?string $link): User 
{ 
 131         public function getLink(): ?string { 
 138          * @param string $phone 
 142         public function setPhone(?string $phone): User 
{ 
 143                 $this->phone 
= $phone; 
 153         public function getPhone(): ?string { 
 160          * @param string $profile 
 164         public function setProfile(string $profile): User 
{ 
 165                 $this->profile 
= $profile; 
 175         public function getProfile(): ?string { 
 176                 return $this->profile
; 
 182          * @param Application $application 
 186         public function addApplication(Application 
$application): User 
{ 
 187                 $this->applications
[] = $application; 
 195          * @param Application $application 
 197         public function removeApplication(Application 
$application): bool { 
 198                 return $this->applications
->removeElement($application); 
 204          * @return ArrayCollection 
 206         public function getApplications(): ArrayCollection 
{ 
 207                 return $this->applications
; 
 213          * @param Snippet $snippet 
 217         public function addSnippet(Snippet 
$snippet): User 
{ 
 218                 $this->snippets
[] = $snippet; 
 226          * @param Snippet $snippet 
 228         public function removeSnippet(Snippet 
$snippet): bool { 
 229                 return $this->snippets
->removeElement($snippet); 
 235          * @return ArrayCollection 
 237         public function getSnippets(): ArrayCollection 
{ 
 238                 return $this->snippets
; 
 244          * @param Dance $dance 
 248         public function addDance(Dance 
$dance): User 
{ 
 249                 $this->dances
[] = $dance; 
 257          * @param Dance $dance 
 261         public function removeDance(Dance 
$dance): bool { 
 262                 return $this->dances
->removeElement($dance); 
 268          * @return ArrayCollection 
 270         public function getDances(): ArrayCollection 
{ 
 271                 return $this->dances
; 
 277          * @param Location $location 
 281         public function addLocation(Location 
$location): User 
{ 
 282                 $this->locations
[] = $location; 
 290          * @param Location $location 
 292         public function removeLocation(Location 
$location): bool { 
 293                 return $this->locations
->removeElement($location); 
 299          * @return ArrayCollection 
 301         public function getLocations(): ArrayCollection 
{ 
 302                 return $this->locations
; 
 308          * @param User $subscriber 
 312         public function addSubscriber(User 
$subscriber): User 
{ 
 313                 $this->subscribers
[] = $subscriber; 
 321          * @param User $subscriber 
 323         public function removeSubscriber(User 
$subscriber): bool { 
 324                 return $this->subscribers
->removeElement($subscriber); 
 330          * @return ArrayCollection 
 332         public function getSubscribers(): ArrayCollection 
{ 
 333                 return $this->subscribers
; 
 339          * @param User $subscription 
 343         public function addSubscription(User 
$subscription): User 
{ 
 344                 $this->subscriptions
[] = $subscription; 
 350          * Remove subscription 
 352          * @param User $subscription 
 354         public function removeSubscription(User 
$subscription): bool { 
 355                 return $this->subscriptions
->removeElement($subscription); 
 361          * @return ArrayCollection 
 363         public function getSubscriptions(): ArrayCollection 
{ 
 364                 return $this->subscriptions
;