| 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 | /** |
||
| 17 | * String representation of {@link Area} |
||
| 18 | * |
||
| 19 | * @return string |
||
| 20 | */ |
||
| 21 | 3 | public function __toString() |
|
| 25 | |||
| 26 | 27 | protected function getId() |
|
| 30 | |||
| 31 | 6 | protected function getName() |
|
| 35 | |||
| 36 | 3 | protected function getType() |
|
| 40 | |||
| 41 | 3 | protected function getIdentifiers() |
|
| 45 | |||
| 46 | 3 | protected function getOtherNames() |
|
| 50 | |||
| 51 | 3 | protected function getWikidata() |
|
| 55 | } |
||
| 56 |
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@propertyannotation 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.