File upload stuff.
[rock.divinelegy.git] / Services / Uploads / File.php
1 <?php
2
3 namespace Services\Uploads;
4
5 use Services\Uploads\IFile;
6
7 class File implements IFile {
8
9 private $_size;
10 private $_name;
11 private $_tempName;
12 private $_type;
13
14 public function __construct($name, $type, $tempName, $size) {
15 $this->_name = $name;
16 $this->_type = $type;
17 $this->_tempName = $tempName;
18 $this->_size = $size;
19 }
20
21 public function getExtension()
22 {
23 return pathinfo($this->_name, PATHINFO_EXTENSION);
24 }
25
26 public function getTempName()
27 {
28 return $this->_tempName;
29 }
30
31 public function getName()
32 {
33 return $this->_name;
34 }
35 }