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
{
18 * @var \Doctrine\Common\Collections\Collection
23 * @var \Doctrine\Common\Collections\Collection
25 private $applications;
30 public function __construct() {
31 parent
::__construct();
37 * @param string $phone
41 public function setPhone($phone) {
42 $this->phone
= $phone;
52 public function getPhone() {
59 * @param \Rapsys\AirBundle\Entity\Vote $vote
63 public function addVote(Vote
$vote) {
64 $this->votes
[] = $vote;
72 * @param \Rapsys\AirBundle\Entity\Vote $vote
74 public function removeVote(Vote
$vote) {
75 $this->votes
->removeElement($vote);
81 * @return \Doctrine\Common\Collections\Collection
83 public function getVotes() {
90 * @param \Rapsys\AirBundle\Entity\Application $application
94 public function addApplication(Application
$application) {
95 $this->applications
[] = $application;
103 * @param \Rapsys\AirBundle\Entity\Application $application
105 public function removeApplication(Application
$application) {
106 $this->applications
->removeElement($application);
112 * @return \Doctrine\Common\Collections\Collection
114 public function getApplications() {
115 return $this->applications
;
123 public function getRoles() {
125 //XXX: [ ROLE_USER, ROLE_XXX, ... ]
126 return parent
::getRoles();