Exemplo n.º 1
0
 /**
  * Retrieve client for this stream type
  *
  * @param  string $path
  * @return Zend_Service_Amazon_S3
  */
 protected function _getS3Client($path)
 {
     if ($this->_s3 === null) {
         $url = explode(':', $path);
         if (!$url) {
             throw new Exception\InvalidArgumentException("Unable to parse URL {$path}");
         }
         $this->_s3 = S3::getWrapperClient($url[0]);
         if (!$this->_s3) {
             throw new Exception\RuntimeException("Unknown client for wrapper {$url[0]}");
         }
     }
     return $this->_s3;
 }