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\Vote
;
9 use Rapsys\UserBundle\Entity\User
as BaseUser
;
11 class User
extends BaseUser
{
28 * @var \Doctrine\Common\Collections\Collection
30 private $applications;
33 * @var \Doctrine\Common\Collections\Collection
38 * @var \Doctrine\Common\Collections\Collection
40 private $subscriptions;
43 * @var \Doctrine\Common\Collections\Collection
50 public function __construct() {
51 //Call parent constructor
52 parent
::__construct();
55 $this->applications
= new \Doctrine\Common\Collections\
ArrayCollection();
56 $this->subscribers
= new \Doctrine\Common\Collections\
ArrayCollection();
57 $this->subscriptions
= new \Doctrine\Common\Collections\
ArrayCollection();
58 $this->snippets
= new \Doctrine\Common\Collections\
ArrayCollection();
64 * @param string $phone
68 public function setPhone($phone) {
69 $this->phone
= $phone;
79 public function getPhone() {
86 * @param string $donation
90 public function setDonation($donation) {
91 $this->donation
= $donation;
101 public function getDonation() {
102 return $this->donation
;
108 * @param string $site
112 public function setSite($site) {
123 public function getSite() {
130 * @param \Rapsys\AirBundle\Entity\Application $application
134 public function addApplication(Application
$application) {
135 $this->applications
[] = $application;
143 * @param \Rapsys\AirBundle\Entity\Application $application
145 public function removeApplication(Application
$application) {
146 $this->applications
->removeElement($application);
152 * @return \Doctrine\Common\Collections\Collection
154 public function getApplications() {
155 return $this->applications
;
161 * @param \Rapsys\AirBundle\Entity\User $subscriber
165 public function addSubscriber(User
$subscriber) {
166 $this->subscribers
[] = $subscriber;
174 * @param \Rapsys\AirBundle\Entity\User $subscriber
176 public function removeSubscriber(User
$subscriber) {
177 $this->subscribers
->removeElement($subscriber);
183 * @return \Doctrine\Common\Collections\Collection
185 public function getSubscribers() {
186 return $this->subscribers
;
192 * @param \Rapsys\AirBundle\Entity\User $subscription
196 public function addSubscription(User
$subscription) {
197 $this->subscriptions
[] = $subscription;
203 * Remove subscription
205 * @param \Rapsys\AirBundle\Entity\User $subscription
207 public function removeSubscription(User
$subscription) {
208 $this->subscriptions
->removeElement($subscription);
214 * @return \Doctrine\Common\Collections\Collection
216 public function getSubscriptions() {
217 return $this->subscriptions
;
223 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
227 public function addSnippet(\Rapsys\AirBundle\Entity\Snippet
$snippet) {
228 $this->snippets
[] = $snippet;
236 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
238 public function removeSnippet(\Rapsys\AirBundle\Entity\Snippet
$snippet) {
239 $this->snippets
->removeElement($snippet);
245 * @return \Doctrine\Common\Collections\Collection
247 public function getSnippets() {
248 return $this->snippets
;