]> Raphaƫl G. Git Repositories - airbundle/blob - Entity/User.php
Fix manifest to install from package instead of recipe
[airbundle] / Entity / User.php
1 <?php
2
3 // src/Rapsys/AirBundle/Entity/User.php
4 namespace Rapsys\AirBundle\Entity;
5
6 class User extends \Rapsys\UserBundle\Entity\User {
7 /**
8 * @var \Doctrine\Common\Collections\Collection
9 */
10 private $votes;
11
12 /**
13 * @var \Doctrine\Common\Collections\Collection
14 */
15 private $applications;
16
17 /**
18 * Constructor
19 */
20 public function __construct() {
21 parent::__construct();
22 }
23
24 /**
25 * Add vote
26 *
27 * @param \Rapsys\AirBundle\Entity\Vote $vote
28 *
29 * @return User
30 */
31 public function addVote(\Rapsys\AirBundle\Entity\Vote $vote) {
32 $this->votes[] = $vote;
33
34 return $this;
35 }
36
37 /**
38 * Remove vote
39 *
40 * @param \Rapsys\AirBundle\Entity\Vote $vote
41 */
42 public function removeVote(\Rapsys\AirBundle\Entity\Vote $vote) {
43 $this->votes->removeElement($vote);
44 }
45
46 /**
47 * Get votes
48 *
49 * @return \Doctrine\Common\Collections\Collection
50 */
51 public function getVotes() {
52 return $this->votes;
53 }
54
55 /**
56 * Add application
57 *
58 * @param \Rapsys\AirBundle\Entity\Application $application
59 *
60 * @return User
61 */
62 public function addApplication(\Rapsys\AirBundle\Entity\Application $application) {
63 $this->applications[] = $application;
64
65 return $this;
66 }
67
68 /**
69 * Remove application
70 *
71 * @param \Rapsys\AirBundle\Entity\Application $application
72 */
73 public function removeApplication(\Rapsys\AirBundle\Entity\Application $application) {
74 $this->applications->removeElement($application);
75 }
76
77 /**
78 * Get applications
79 *
80 * @return \Doctrine\Common\Collections\Collection
81 */
82 public function getApplications() {
83 return $this->applications;
84 }
85 }