| 1 | <?php |
||
| 6 | class Setting extends Entity |
||
| 7 | { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Fields that can be mass assigned using newEntity() or patchEntity(). |
||
| 11 | * |
||
| 12 | * Note that when '*' is set to true, this allows all unspecified fields to |
||
| 13 | * be mass assigned. For security purposes, it is advised to set '*' to false |
||
| 14 | * (or remove it), and explicitly make individual fields accessible as needed. |
||
| 15 | * |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $_accessible = [ |
||
| 19 | '*' => true, |
||
| 20 | 'id' => false, |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Get the value of the setting. If empty, return null. |
||
| 25 | * |
||
| 26 | * @return int|string|null |
||
| 27 | */ |
||
| 28 | protected function _getValue() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get the value of the boolean. |
||
| 47 | * |
||
| 48 | * @param null|int $value The value of the boolean. |
||
| 49 | * |
||
| 50 | * @return null|int |
||
| 51 | */ |
||
| 52 | protected function _getValueBool($value) |
||
| 64 | } |
||
| 65 |
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.