1 | <?php |
||
17 | class User extends BaseUser { |
||
18 | |||
19 | /** |
||
20 | * @ORM\Id |
||
21 | * @ORM\Column(type="integer") |
||
22 | * @ORM\GeneratedValue(strategy="AUTO") |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | /** |
||
27 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Group", inversedBy="users") |
||
28 | * @ORM\JoinTable(name="fos_user_user_group", |
||
29 | * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}, |
||
30 | * inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id")} |
||
31 | * ) |
||
32 | */ |
||
33 | protected $groups; |
||
34 | |||
35 | /** |
||
36 | * @ORM\Column(type="integer", length=6, options={"default":0}) |
||
37 | */ |
||
38 | protected $loginCount = 0; |
||
39 | |||
40 | /** |
||
41 | * @var \DateTime |
||
42 | * |
||
43 | * @ORM\Column(type="datetime", nullable=true) |
||
44 | */ |
||
45 | protected $firstLogin; |
||
46 | |||
47 | public function __construct() { |
||
51 | |||
52 | /** |
||
53 | * Set loginCount |
||
54 | * |
||
55 | * @param integer $loginCount |
||
56 | * |
||
57 | * @return User |
||
58 | */ |
||
59 | public function setLoginCount($loginCount) { |
||
63 | |||
64 | /** |
||
65 | * Get loginCount |
||
66 | * |
||
67 | * @return integer |
||
68 | */ |
||
69 | public function getLoginCount() { |
||
72 | |||
73 | /** |
||
74 | * Set firstLogin |
||
75 | * |
||
76 | * @param \DateTime $firstLogin |
||
77 | * |
||
78 | * @return User |
||
79 | */ |
||
80 | public function setFirstLogin($firstLogin) { |
||
84 | |||
85 | /** |
||
86 | * Get firstLogin |
||
87 | * |
||
88 | * @return \DateTime |
||
89 | */ |
||
90 | public function getFirstLogin() { |
||
93 | |||
94 | function getEnabled() { |
||
97 | |||
98 | function getLocked() { |
||
101 | |||
102 | function getExpired() { |
||
105 | |||
106 | function getExpiresAt() { |
||
107 | return $this->expiresAt; |
||
108 | } |
||
109 | |||
110 | function getCredentialsExpired() { |
||
113 | |||
114 | function getCredentialsExpireAt() { |
||
115 | return $this->credentialsExpireAt; |
||
116 | } |
||
117 | |||
118 | function setSalt($salt) { |
||
121 | |||
122 | public function setPassword($password) { |
||
128 | |||
129 | function setGroups(Collection $groups = null) { |
||
134 | |||
135 | public function setRoles(array $roles = array()) { |
||
136 | $this->roles = array(); |
||
137 | foreach ($roles as $role) { |
||
138 | $this->addRole($role); |
||
139 | } |
||
140 | return $this; |
||
141 | } |
||
142 | |||
143 | public function hasGroup($name = '') { |
||
146 | |||
147 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.