amdp3-metaforums/Application/HTTP/File.php

19 lines
420 B
PHP
Raw Permalink Normal View History

2019-11-20 05:19:02 +00:00
<?php
namespace Application\HTTP;
class File {
private $data;
public function __construct($data) {
$this->data = $data;
}
public function move($path) {
move_uploaded_file($this->data["tmp_name"],$path);
}
public function name() {
return $this->data["name"];
}
public function extension() {
return pathinfo($this->data["name"],PATHINFO_EXTENSION);
}
}