1 | <?php |
||
7 | class Event extends PopoloObject |
||
8 | { |
||
9 | protected $properties = [ |
||
10 | 'id', |
||
11 | 'name', |
||
12 | 'classification', |
||
13 | 'startDate', |
||
14 | 'endDate', |
||
15 | 'organizationId', |
||
16 | 'organization', |
||
17 | 'identifiers', |
||
18 | 'current', |
||
19 | ]; |
||
20 | |||
21 | /** |
||
22 | * String representation of {@link Event} |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | 6 | public function __toString() |
|
30 | |||
31 | 42 | protected function getId() |
|
35 | |||
36 | 9 | protected function getName() |
|
40 | |||
41 | 3 | protected function getClassification() |
|
45 | |||
46 | 12 | protected function getStartDate() |
|
51 | |||
52 | 9 | protected function getEndDate() |
|
57 | |||
58 | 6 | protected function getOrganizationId() |
|
62 | |||
63 | 3 | protected function getOrganization() |
|
67 | |||
68 | 3 | protected function getIdentifiers() |
|
72 | |||
73 | protected function getCurrent() |
||
77 | |||
78 | 9 | public function currentAt($when) |
|
82 | } |
||
83 |
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.