1 | <?php |
||
19 | class File extends Model implements TaggableInterface |
||
20 | { |
||
21 | use Translatable, NamespacedEntity, TaggableTrait; |
||
22 | /** |
||
23 | * All the different images types where thumbnails should be created |
||
24 | * @var array |
||
25 | */ |
||
26 | private $imageExtensions = ['jpg', 'png', 'jpeg', 'gif']; |
||
27 | |||
28 | protected $table = 'media__files'; |
||
29 | public $translatedAttributes = ['description', 'alt_attribute', 'keywords']; |
||
30 | protected $fillable = [ |
||
31 | 'description', |
||
32 | 'alt_attribute', |
||
33 | 'keywords', |
||
34 | 'filename', |
||
35 | 'path', |
||
36 | 'extension', |
||
37 | 'mimetype', |
||
38 | 'width', |
||
39 | 'height', |
||
40 | 'filesize', |
||
41 | 'folder_id', |
||
42 | ]; |
||
43 | protected $appends = ['path_string', 'media_type']; |
||
44 | protected static $entityNamespace = 'asgardcms/media'; |
||
45 | |||
46 | public function getPathAttribute($value) |
||
50 | |||
51 | public function getPathStringAttribute() |
||
55 | |||
56 | public function getMediaTypeAttribute() |
||
60 | |||
61 | public function isImage() |
||
65 | |||
66 | public function getThumbnail($type) |
||
74 | } |
||
75 |
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.