| 1 | <?php |
||
| 12 | class News extends UuidModel |
||
| 13 | { |
||
| 14 | use ImageableTrait, CommentableTrait, BelongsToMinistryTrait, StorageTrait, TitleTrait; |
||
| 15 | |||
| 16 | protected $table = 'fg_news'; |
||
| 17 | |||
| 18 | //****************************************************************************// |
||
| 19 | //***************************** MODEL ATTRIBUTES *****************************// |
||
| 20 | //****************************************************************************// |
||
| 21 | public function getTitleAttribute($val) |
||
| 25 | |||
| 26 | //****************************************************************************// |
||
| 27 | //***************************** MODEL RELATIONSHIPS *****************************// |
||
| 28 | //****************************************************************************// |
||
| 29 | |||
| 30 | /** |
||
| 31 | * The name of the directory in storage that has files for this model. |
||
| 32 | * @return mixed |
||
| 33 | */ |
||
| 34 | public function filesDir() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * The file name fo this model. |
||
| 41 | * @return mixed |
||
| 42 | */ |
||
| 43 | public function getFileName() |
||
| 47 | |||
| 48 | public function getImageDimensions() |
||
| 52 | } |
||
| 53 |
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.