Exemplo n.º 1
0
 /**
  * Renew properties by path
  *
  * @param string $path Path
  *
  * @return boolean
  */
 protected function renewByPath($path)
 {
     $result = parent::renewByPath($path);
     if ($result) {
         $data = @getimagesize($path);
         if (is_array($data)) {
             $this->setWidth($data[0]);
             $this->setHeight($data[1]);
             $this->setMime($data['mime']);
             $hash = \Includes\Utils\FileManager::getHash($path);
             if ($hash) {
                 $this->setHash($hash);
             }
         } else {
             $result = false;
         }
     }
     return $result;
 }