1 | <?php |
||
5 | class Area extends PopoloObject |
||
6 | { |
||
7 | protected $properties = [ |
||
8 | 'id', |
||
9 | 'name', |
||
10 | 'type', |
||
11 | 'identifiers', |
||
12 | 'otherNames', |
||
13 | 'wikidata', |
||
14 | ]; |
||
15 | |||
16 | 3 | public function __toString() |
|
20 | |||
21 | 27 | protected function getId() |
|
25 | |||
26 | 6 | protected function getName() |
|
30 | |||
31 | 3 | protected function getType() |
|
35 | |||
36 | 3 | protected function getIdentifiers() |
|
40 | |||
41 | 3 | protected function getOtherNames() |
|
45 | |||
46 | 3 | protected function getWikidata() |
|
50 | } |
||
51 |
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.