1 | <?php |
||
5 | class Organization extends PopoloObject |
||
6 | { |
||
7 | protected $properties = [ |
||
8 | 'id', |
||
9 | 'name', |
||
10 | 'wikidata', |
||
11 | 'classification', |
||
12 | 'image', |
||
13 | 'foundingDate', |
||
14 | 'dissolutionDate', |
||
15 | 'seats', |
||
16 | 'otherNames', |
||
17 | 'identifiers', |
||
18 | 'links', |
||
19 | ]; |
||
20 | |||
21 | 3 | public function __toString() |
|
25 | |||
26 | 42 | protected function getId() |
|
30 | |||
31 | 6 | protected function getName() |
|
35 | |||
36 | 6 | protected function getWikidata() |
|
40 | |||
41 | 3 | protected function getClassification() { |
|
44 | |||
45 | 3 | protected function getImage() |
|
49 | |||
50 | 3 | protected function getFoundingDate() |
|
66 | |||
67 | 3 | protected function getIdentifiers() |
|
71 | |||
72 | 3 | protected function getLinks() |
|
76 | } |
||
77 |
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.