]> Raphaƫl G. Git Repositories - userbundle/blob - Entity/Civility.php
Extends DefaultLogoutSuccessHandler
[userbundle] / Entity / Civility.php
1 <?php
2
3 namespace Rapsys\UserBundle\Entity;
4
5 /**
6 * Civility
7 */
8 class Civility {
9 /**
10 * @var integer
11 */
12 protected $id;
13
14 /**
15 * @var string
16 */
17 protected $title;
18
19 /**
20 * @var \DateTime
21 */
22 protected $created;
23
24 /**
25 * @var \DateTime
26 */
27 protected $updated;
28
29 /**
30 * @var \Doctrine\Common\Collections\Collection
31 */
32 protected $users;
33
34 /**
35 * Constructor
36 */
37 public function __construct() {
38 $this->users = new \Doctrine\Common\Collections\ArrayCollection();
39 }
40
41 /**
42 * Get id
43 *
44 * @return integer
45 */
46 public function getId() {
47 return $this->id;
48 }
49
50 /**
51 * Set title
52 *
53 * @param string $title
54 *
55 * @return Civility
56 */
57 public function setTitle($title) {
58 $this->title = $title;
59
60 return $this;
61 }
62
63 /**
64 * Get title
65 *
66 * @return string
67 */
68 public function getTitle() {
69 return $this->title;
70 }
71
72 /**
73 * Set created
74 *
75 * @param \DateTime $created
76 *
77 * @return Civility
78 */
79 public function setCreated($created) {
80 $this->created = $created;
81
82 return $this;
83 }
84
85 /**
86 * Get created
87 *
88 * @return \DateTime
89 */
90 public function getCreated() {
91 return $this->created;
92 }
93
94 /**
95 * Set updated
96 *
97 * @param \DateTime $updated
98 *
99 * @return Civility
100 */
101 public function setUpdated($updated) {
102 $this->updated = $updated;
103
104 return $this;
105 }
106
107 /**
108 * Get updated
109 *
110 * @return \DateTime
111 */
112 public function getUpdated() {
113 return $this->updated;
114 }
115
116 /**
117 * Add user
118 *
119 * @param \Rapsys\UserBundle\Entity\User $user
120 *
121 * @return Civility
122 */
123 public function addUser(\Rapsys\UserBundle\Entity\User $user) {
124 $this->users[] = $user;
125
126 return $this;
127 }
128
129 /**
130 * Remove user
131 *
132 * @param \Rapsys\UserBundle\Entity\User $user
133 */
134 public function removeUser(\Rapsys\UserBundle\Entity\User $user) {
135 $this->users->removeElement($user);
136 }
137
138 /**
139 * Get users
140 *
141 * @return \Doctrine\Common\Collections\Collection
142 */
143 public function getUsers() {
144 return $this->users;
145 }
146
147 /**
148 * Returns a string representation of the title
149 *
150 * @return string
151 */
152 public function __toString(): string {
153 return $this->title;
154 }
155 }