Beispiel #1
0
 public function __construct($type)
 {
     parent::__construct();
     $type = trim(strtolower($type), '.');
     if (!$this->issetType($type)) {
         throw new SystemException("Could not find type '{$type}' in BlankFile");
     }
     $typeData = $this->getType($type);
     $this->name = $typeData['newFileName'] . $typeData['ext'];
     $this->mimeType = TypeFile::getMimeTypeByFilename($this->name);
     $this->src = $typeData['src'];
     $this->size = IO\File::isFileExists($typeData['src']) ? filesize($typeData['src']) : 0;
 }