44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Hura8\Interfaces;
|
|
|
|
|
|
class FileHandleInfo
|
|
{
|
|
|
|
public $file_name;
|
|
public $public_path;
|
|
public $local_path;
|
|
public $mime_type;
|
|
public $file_size;
|
|
public $file_ext;
|
|
public $width = 0;
|
|
public $height = 0;
|
|
|
|
|
|
public function __construct(array $file_info = []) {
|
|
/*$file_info = [
|
|
"file_name" => $clean_file_name,
|
|
"public_path" => $this->public_dir . "/".$clean_file_name,
|
|
"local_path" => $this->target_dir . "/" . $clean_file_name,
|
|
"mime_type" => $mimeType,
|
|
"file_size" => $file_size,
|
|
"file_ext" => $file_ext,
|
|
"width" => 0,
|
|
"height" => 0,
|
|
];*/
|
|
|
|
$this->file_name = $file_info['file_name'] ?? '' ;
|
|
$this->public_path = $file_info['public_path'] ?? '' ;
|
|
$this->local_path = $file_info['local_path'] ?? '' ;
|
|
$this->mime_type = $file_info['mime_type'] ?? '' ;
|
|
$this->file_size = $file_info['file_size'] ?? 0 ;
|
|
$this->file_ext = $file_info['file_ext'] ?? '' ;
|
|
$this->width = $file_info['width'] ?? 0 ;
|
|
$this->height = $file_info['height'] ?? 0 ;
|
|
|
|
}
|
|
|
|
|
|
}
|