Пример #1
0
 public function __construct($filename, $autoCreate = false)
 {
     if ($filename instanceof Oops_File) {
         $this->_fileObject = $filename;
         $filename = $filename->filename;
     }
     parent::__construct($filename, $autoCreate);
 }
Пример #2
0
 /**
  * Requires uploaded file info as array with keys: 'tmp_name','name','type','error','size'
  *  
  * @param array $fileInfo
  * @return unknown_type
  */
 public function __construct($fileInfo)
 {
     parent::__construct($fileInfo['tmp_name']);
     $this->_size = $fileInfo['size'];
     $this->_type = $fileInfo['type'];
     $this->_name = $fileInfo['name'];
     $pathInfo = pathinfo($this->_name);
     $this->_extension = strtolower($pathInfo['extension']);
     $this->_basename = $pathInfo['basename'];
 }
Пример #3
0
 /**
  * 
  * @param string|Oops_File $filename
  * @return unknown_type
  */
 public function __construct($filename)
 {
     if ($filename instanceof Oops_File) {
         foreach (get_object_vars($filename) as $k => $v) {
             $this->{$k} = $v;
         }
     } else {
         parent::__construct($filename);
     }
     // @todo check if valid video
     $this->_statVideo();
 }