1 | <?php |
||
5 | class Post extends PopoloObject |
||
6 | { |
||
7 | protected $properties = [ |
||
8 | 'id', |
||
9 | 'label', |
||
10 | 'organizationId', |
||
11 | 'organization', |
||
12 | ]; |
||
13 | |||
14 | 3 | public function __toString() |
|
18 | |||
19 | 21 | protected function getId() |
|
23 | |||
24 | 6 | protected function getLabel() |
|
28 | |||
29 | 6 | protected function getOrganizationId() |
|
33 | |||
34 | 3 | protected function getOrganization() |
|
38 | } |
||
39 |
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.