예제 #1
0
파일: Image.php 프로젝트: kingsj/core
 /**
  * Get local path for file-based PHP functions
  *
  * @return array
  */
 protected function getLocalPath()
 {
     if (self::STORAGE_S3 == $this->getStorageType()) {
         $path = tempnam(LC_DIR_TMP, 'analyse_file');
         $result = \Includes\Utils\FileManager::write($path, $this->getS3()->read($this->getStoragePath()));
         if (!$result) {
             \XLite\Logger::getInstance()->log('Unable to write data to file \'' . $path . '\'.', LOG_ERR);
             $path = false;
         }
         $result = array($path, true);
     } else {
         $result = parent::getLocalPath();
     }
     return $result;
 }