Total Complexity | 3 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Arcanesoft\Media\Entities; |
||
9 | class FileItem extends MediaItem |
||
10 | { |
||
11 | /* ----------------------------------------------------------------- |
||
12 | | Properties |
||
13 | | ----------------------------------------------------------------- |
||
14 | */ |
||
15 | |||
16 | public $url; |
||
17 | public $mimetype; |
||
18 | public $lastModified; |
||
19 | public $visibility; |
||
20 | public $size; |
||
21 | |||
22 | /* ----------------------------------------------------------------- |
||
23 | | Main Methods |
||
24 | | ----------------------------------------------------------------- |
||
25 | */ |
||
26 | |||
27 | protected function load(array $data, string $path) |
||
28 | { |
||
29 | $this->url = $data['url']; |
||
30 | $this->mimetype = $data['mimetype']; |
||
31 | $this->lastModified = $data['lastModified']; |
||
32 | $this->visibility = $data['visibility']; |
||
33 | $this->size = $data['size']; |
||
34 | } |
||
35 | |||
36 | /* ----------------------------------------------------------------- |
||
37 | | Getters |
||
38 | | ----------------------------------------------------------------- |
||
39 | */ |
||
40 | |||
41 | /** |
||
42 | * Get the item type. |
||
43 | * |
||
44 | * @return mixed |
||
45 | */ |
||
46 | public function type(): string |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return array |
||
53 | */ |
||
54 | public function toArray(): array |
||
65 |