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
31 private $subscriptions;
34 * @var \Doctrine\Common\Collections\Collection
41 public function __construct() {
42 //Call parent constructor
43 parent
::__construct();
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();
55 * @param string $phone
59 public function setPhone($phone) {
60 $this->phone
= $phone;
70 public function getPhone() {
77 * @param string $donation
81 public function setDonation($donation) {
82 $this->donation
= $donation;
92 public function getDonation() {
93 return $this->donation
;
103 public function setSite($site) {
114 public function getSite() {
121 * @param \Rapsys\AirBundle\Entity\Application $application
125 public function addApplication(Application
$application) {
126 $this->applications
[] = $application;
134 * @param \Rapsys\AirBundle\Entity\Application $application
136 public function removeApplication(Application
$application) {
137 $this->applications
->removeElement($application);
143 * @return \Doctrine\Common\Collections\Collection
145 public function getApplications() {
146 return $this->applications
;
152 * @param \Rapsys\AirBundle\Entity\User $subscriber
156 public function addSubscriber(User
$subscriber) {
157 $this->subscribers
[] = $subscriber;
165 * @param \Rapsys\AirBundle\Entity\User $subscriber
167 public function removeSubscriber(User
$subscriber) {
168 $this->subscribers
->removeElement($subscriber);
174 * @return \Doctrine\Common\Collections\Collection
176 public function getSubscribers() {
177 return $this->subscribers
;
183 * @param \Rapsys\AirBundle\Entity\User $subscription
187 public function addSubscription(User
$subscription) {
188 $this->subscriptions
[] = $subscription;
194 * Remove subscription
196 * @param \Rapsys\AirBundle\Entity\User $subscription
198 public function removeSubscription(User
$subscription) {
199 $this->subscriptions
->removeElement($subscription);
205 * @return \Doctrine\Common\Collections\Collection
207 public function getSubscriptions() {
208 return $this->subscriptions
;
214 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
218 public function addSnippet(Snippet
$snippet) {
219 $this->snippets
[] = $snippet;
227 * @param \Rapsys\AirBundle\Entity\Snippet $snippet
229 public function removeSnippet(Snippet
$snippet) {
230 $this->snippets
->removeElement($snippet);
236 * @return \Doctrine\Common\Collections\Collection
238 public function getSnippets() {
239 return $this->snippets
;