| 1 | <?php |
||
| 8 | final class LoggerObserver extends BaseObserver |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Listen to the BaseModel created event. |
||
| 12 | * |
||
| 13 | * @param BaseModel $model |
||
| 14 | * @return void |
||
| 15 | */ |
||
| 16 | public function created(BaseModel $model) |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Listen to the BaseModel updated event. |
||
| 23 | * |
||
| 24 | * @param BaseModel $model |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function updated(BaseModel $model) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Listen to the BaseModel deleted event. |
||
| 34 | * |
||
| 35 | * @param BaseModel $model |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function deleted(BaseModel $model) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Listen to the BaseModel restored event. |
||
| 45 | * |
||
| 46 | * @param BaseModel $model |
||
| 47 | * @return void |
||
| 48 | */ |
||
| 49 | public function restored(BaseModel $model) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $event |
||
| 56 | * @param BaseModel $model |
||
| 57 | */ |
||
| 58 | private function logEvent($event, BaseModel $model) |
||
| 74 | } |
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.