1 | <?php |
||
21 | class Asset extends UploadedFile |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $storageMetadata = []; |
||
27 | |||
28 | /** |
||
29 | * Override UploadedFile constructor |
||
30 | */ |
||
31 | 11 | public function __construct() |
|
34 | |||
35 | 2 | public function __toString() |
|
39 | |||
40 | /** |
||
41 | * Returns the filename property. |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | public function getStorageMetadata() |
||
49 | |||
50 | /** |
||
51 | * Returns the filename property. |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 3 | public function getFilename() |
|
59 | |||
60 | /** |
||
61 | * Returns the filepath property. |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | 1 | public function getFilepath() |
|
69 | |||
70 | /** |
||
71 | * Returns the extension property. |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | 3 | public function getExtension() |
|
79 | |||
80 | /** |
||
81 | * Returns the pathname property. |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | 3 | public function getPathname() |
|
89 | |||
90 | /** |
||
91 | * Returns the mimeType property. |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | 3 | public function getMimeType() |
|
99 | |||
100 | /** |
||
101 | * Returns the clientOriginalName property. |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | 1 | public function getClientOriginalName() |
|
109 | |||
110 | /** |
||
111 | * Returns the clientOriginalExtension property. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | 1 | public function getClientOriginalExtension() |
|
119 | |||
120 | /** |
||
121 | * Returns the clientMimeType property. |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | 1 | public function getClientMimeType() |
|
129 | |||
130 | /** |
||
131 | * Returns the filename property. |
||
132 | * |
||
133 | * @param array $value |
||
134 | * @return self |
||
135 | */ |
||
136 | public function setStorageMetadata(array $value = []) |
||
141 | |||
142 | /** |
||
143 | * Sets the filename property. |
||
144 | * |
||
145 | * @param string $value |
||
146 | * @return self |
||
147 | */ |
||
148 | 11 | public function setFilename($value) |
|
153 | |||
154 | /** |
||
155 | * Sets the filepath property. |
||
156 | * |
||
157 | * @param string $value |
||
158 | * @return self |
||
159 | */ |
||
160 | 3 | public function setFilepath($value) |
|
165 | |||
166 | /** |
||
167 | * Sets the extension property. |
||
168 | * |
||
169 | * @param string $value |
||
170 | * @return self |
||
171 | */ |
||
172 | 11 | public function setExtension($value) |
|
177 | |||
178 | /** |
||
179 | * Sets the pathname property. |
||
180 | * |
||
181 | * @param string $value |
||
182 | * @return self |
||
183 | */ |
||
184 | 11 | public function setPathname($value) |
|
189 | |||
190 | /** |
||
191 | * Sets the mimeType property. |
||
192 | * |
||
193 | * @param string $value |
||
194 | * @return self |
||
195 | */ |
||
196 | 11 | public function setMimeType($value) |
|
201 | |||
202 | /** |
||
203 | * Sets the clientOriginalName property. |
||
204 | * |
||
205 | * @param string $value |
||
206 | * @return self |
||
207 | */ |
||
208 | 11 | public function setClientOriginalName($value) |
|
213 | |||
214 | /** |
||
215 | * Sets the clientOriginalExtension property. |
||
216 | * |
||
217 | * @param string $value |
||
218 | * @return self |
||
219 | */ |
||
220 | 11 | public function setClientOriginalExtension($value) |
|
225 | |||
226 | /** |
||
227 | * Sets the clientMimeType property. |
||
228 | * |
||
229 | * @param string $value |
||
230 | * @return self |
||
231 | */ |
||
232 | 1 | public function setClientMimeType($value) |
|
237 | } |
||
238 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: