1 | <?php |
||
7 | class User |
||
8 | { |
||
9 | /** |
||
10 | * @Id @GeneratedValue @Column(type="integer") |
||
11 | * @var integer |
||
12 | */ |
||
13 | protected $id; |
||
14 | |||
15 | /** |
||
16 | * @Column(type="string") |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $email; |
||
20 | |||
21 | /** |
||
22 | * @Column(type="string") |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $password; |
||
26 | |||
27 | /** |
||
28 | * @Column(type="string") |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $role; |
||
32 | |||
33 | /** |
||
34 | * @Column(type="string") |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $name; |
||
38 | |||
39 | /** |
||
40 | * @Column(type="string") |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $created_at; |
||
44 | |||
45 | /** |
||
46 | * @Column(type="string") |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $updated_at; |
||
50 | |||
51 | public function getId() |
||
55 | |||
56 | public function setId($id) |
||
60 | |||
61 | public function getEmail() |
||
65 | |||
66 | public function setEmail($email) |
||
70 | |||
71 | public function getPassword() |
||
75 | |||
76 | // @todo add security hashing here |
||
77 | public function setPassword($password) |
||
81 | |||
82 | public function getRole() |
||
86 | |||
87 | public function setRole($role) |
||
91 | |||
92 | public function getName() |
||
96 | |||
97 | public function setName($name) |
||
101 | |||
102 | public function getCreatedAt() |
||
106 | |||
107 | public function setCreatedAt($created) |
||
111 | |||
112 | public function getUpdatedAt() |
||
116 | |||
117 | public function setUpdatedAt($updated) |
||
121 | |||
122 | /** |
||
123 | * @ORM\PrePersist |
||
124 | */ |
||
125 | public function doStuffOnPrePersist() |
||
129 | |||
130 | /** |
||
131 | * @ORM\PreMerge |
||
132 | */ |
||
133 | public function doStuffOnPreMerge() |
||
137 | } |
||
138 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.