Exemplo n.º 1
0
 /**
  * Store an item in the storage service.
  *
  * WARNING: This operation overwrites any item that is located at
  * $destinationPath.
  *
  * @TODO Support streams
  *
  * @param string $destinationPath
  * @param string|resource $data
  * @param  array $options
  * @return void
  */
 public function storeItem($destinationPath, $data, $options = array())
 {
     try {
         $fullPath = $this->_getFullPath($destinationPath, $options);
         return $this->_s3->putObject($fullPath, $data, empty($options[self::METADATA]) ? null : $options[self::METADATA]);
     } catch (Zend\Service\Amazon\S3\Exception $e) {
         throw new Exception\RuntimeException('Error on store: ' . $e->getMessage(), $e->getCode(), $e);
     }
 }