1 | <?php |
||
12 | class Filesystem |
||
13 | { |
||
14 | /** |
||
15 | * @var \Illuminate\Contracts\Filesystem\Factory |
||
16 | */ |
||
17 | protected $filesystem; |
||
18 | |||
19 | /** |
||
20 | * @var \Illuminate\Contracts\Config\Repository |
||
21 | */ |
||
22 | protected $config; |
||
23 | |||
24 | /** |
||
25 | * @var \Illuminate\Contracts\Events\Dispatcher |
||
26 | */ |
||
27 | protected $events; |
||
28 | |||
29 | /** |
||
30 | * @param Factory $filesystems |
||
31 | * @param \Illuminate\Contracts\Config\Repository $config |
||
32 | */ |
||
33 | public function __construct(Factory $filesystems, ConfigRepository $config, Dispatcher $events) |
||
39 | |||
40 | /** |
||
41 | * Add a file to the mediaLibrary for the given media. |
||
42 | * |
||
43 | * @param string $file |
||
44 | * @param \Spatie\MediaLibrary\Media $media |
||
45 | * @param string $targetFileName |
||
46 | */ |
||
47 | public function add($file, Media $media, $targetFileName = '') |
||
55 | |||
56 | /** |
||
57 | * Copy a file to the mediaLibrary for the given $media. |
||
58 | * |
||
59 | * @param string $file |
||
60 | * @param \Spatie\MediaLibrary\Media $media |
||
61 | * @param bool $conversions |
||
62 | * @param string $targetFileName |
||
63 | */ |
||
64 | public function copyToMediaLibrary($file, Media $media, $conversions = false, $targetFileName = '') |
||
80 | |||
81 | /** |
||
82 | * Get the headers to be used when copying the |
||
83 | * given file to a remote filesytem. |
||
84 | * |
||
85 | * @param string $file |
||
86 | * |
||
87 | * @return array |
||
88 | */ |
||
89 | public function getRemoteHeadersForFile($file) |
||
97 | |||
98 | /** |
||
99 | * Copy a file from the mediaLibrary to the given targetFile. |
||
100 | * |
||
101 | * @param \Spatie\MediaLibrary\Media $media |
||
102 | * @param string $targetFile |
||
103 | */ |
||
104 | public function copyFromMediaLibrary(Media $media, $targetFile) |
||
114 | |||
115 | /** |
||
116 | * Remove all files for the given media. |
||
117 | * |
||
118 | * @param \Spatie\MediaLibrary\Media $media |
||
119 | */ |
||
120 | public function removeFiles(Media $media) |
||
124 | |||
125 | /** |
||
126 | * Rename a file for the given media. |
||
127 | * |
||
128 | * @param Media $media |
||
129 | * @param string $oldName |
||
130 | * |
||
131 | * @return bool |
||
132 | */ |
||
133 | public function renameFile(Media $media, $oldName) |
||
142 | |||
143 | /** |
||
144 | * Return the directory where all files of the given media are stored. |
||
145 | * |
||
146 | * @param \Spatie\MediaLibrary\Media $media |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getMediaDirectory(Media $media, $conversion = false) |
||
162 | } |
||
163 |
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.