1 | <?php |
||
8 | trait HasNotificationOptions |
||
9 | { |
||
10 | public $token; |
||
11 | |||
12 | public function setToken() |
||
16 | |||
17 | public function initializeHasNotificationOptions() |
||
18 | { |
||
19 | $this->setToken(); |
||
20 | $this->with[] = 'notificationOptions'; |
||
|
|||
21 | } |
||
22 | |||
23 | public function saveNotificationOptions($key, $value) |
||
37 | |||
38 | public function setNotificationOption($key) |
||
51 | |||
52 | public function notificationOptions() |
||
56 | |||
57 | public function __get($key) |
||
71 | |||
72 | public function __set($name, $value) |
||
83 | } |
||
84 |
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.