Total Complexity | 11 |
Total Lines | 91 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class File extends AbstractEntity |
||
8 | { |
||
9 | const ENTITY_TYPE = 'File'; |
||
10 | |||
11 | protected $file_id; |
||
12 | |||
13 | protected $file_size; |
||
14 | |||
15 | protected $file_path; |
||
16 | |||
17 | /** |
||
18 | * @return mixed |
||
19 | */ |
||
20 | public function getFileId() |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param mixed $file_id |
||
27 | * |
||
28 | * @return $this |
||
29 | */ |
||
30 | public function setFileId($file_id) |
||
31 | { |
||
32 | $this->file_id = $file_id; |
||
33 | |||
34 | return $this; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return mixed |
||
39 | */ |
||
40 | public function getFileSize() |
||
41 | { |
||
42 | return $this->file_size; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param mixed $file_size |
||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | public function setFileSize($file_size) |
||
51 | { |
||
52 | $this->file_size = $file_size; |
||
53 | |||
54 | return $this; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function getFilePath() |
||
61 | { |
||
62 | return $this->file_path; |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param mixed $file_path |
||
67 | * |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function setFilePath($file_path) |
||
75 | } |
||
76 | |||
77 | public function download($storePath) |
||
78 | { |
||
79 | if (file_exists($storePath) && !is_writable($storePath)) { |
||
98 | } |
||
99 | } |