1 | <?php |
||
5 | class Event extends PopoloObject |
||
6 | { |
||
7 | protected $properties = [ |
||
8 | 'id', |
||
9 | 'name', |
||
10 | 'classification', |
||
11 | 'startDate', |
||
12 | 'endDate', |
||
13 | 'organizationId', |
||
14 | 'organization', |
||
15 | 'identifiers', |
||
16 | 'current', |
||
17 | ]; |
||
18 | |||
19 | 6 | public function __toString() |
|
23 | |||
24 | 42 | protected function getId() |
|
28 | |||
29 | 9 | protected function getName() |
|
33 | |||
34 | 3 | protected function getClassification() |
|
38 | |||
39 | 12 | protected function getStartDate() |
|
44 | |||
45 | 9 | protected function getEndDate() |
|
50 | |||
51 | 6 | protected function getOrganizationId() |
|
55 | |||
56 | 3 | protected function getOrganization() |
|
60 | |||
61 | 3 | protected function getIdentifiers() |
|
65 | |||
66 | protected function getCurrent() |
||
70 | |||
71 | 9 | public function currentAt($when) |
|
75 | } |
||
76 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.