]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/User.php
Fix flash message translation
[airbundle] / Entity / User.php
1 <?php
2
3 // src/Rapsys/AirBundle/Entity/User.php
4 namespace Rapsys\AirBundle\Entity;
5
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;
10
11 class User extends BaseUser {
12 /**
13 * @var string
14 */
15 protected $phone;
16
17 /**
18 * @var \Doctrine\Common\Collections\Collection
19 */
20 private $votes;
21
22 /**
23 * @var \Doctrine\Common\Collections\Collection
24 */
25 private $applications;
26
27 /**
28 * Set phone
29 *
30 * @param string $phone
31 *
32 * @return User
33 */
34 public function setPhone($phone) {
35 $this->phone = $phone;
36
37 return $this;
38 }
39
40 /**
41 * Get phone
42 *
43 * @return string
44 */
45 public function getPhone() {
46 return $this->phone;
47 }
48
49 /**
50 * Add vote
51 *
52 * @param \Rapsys\AirBundle\Entity\Vote $vote
53 *
54 * @return User
55 */
56 public function addVote(Vote $vote) {
57 $this->votes[] = $vote;
58
59 return $this;
60 }
61
62 /**
63 * Remove vote
64 *
65 * @param \Rapsys\AirBundle\Entity\Vote $vote
66 */
67 public function removeVote(Vote $vote) {
68 $this->votes->removeElement($vote);
69 }
70
71 /**
72 * Get votes
73 *
74 * @return \Doctrine\Common\Collections\Collection
75 */
76 public function getVotes() {
77 return $this->votes;
78 }
79
80 /**
81 * Add application
82 *
83 * @param \Rapsys\AirBundle\Entity\Application $application
84 *
85 * @return User
86 */
87 public function addApplication(Application $application) {
88 $this->applications[] = $application;
89
90 return $this;
91 }
92
93 /**
94 * Remove application
95 *
96 * @param \Rapsys\AirBundle\Entity\Application $application
97 */
98 public function removeApplication(Application $application) {
99 $this->applications->removeElement($application);
100 }
101
102 /**
103 * Get applications
104 *
105 * @return \Doctrine\Common\Collections\Collection
106 */
107 public function getApplications() {
108 return $this->applications;
109 }
110 }