Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function upload($newName = null) { |
||
39 | $success = false; |
||
40 | $this->file = null; |
||
41 | if (!is_null($this->temp) && $this->temp->exists()) { |
||
42 | $success = true; |
||
43 | $this->temp->move($this->directory); |
||
44 | $this->file = clone $this->temp; |
||
45 | if ($newName) { |
||
46 | $this->file->rename($newName); |
||
47 | var_dump($this->file->getPath()); |
||
|
|||
48 | } |
||
49 | } |
||
50 | return $success; |
||
51 | } |
||
54 |