/** * Get an item from the storage service. * * @TODO Support streams * * @param string $path * @param array $options * @return string */ public function fetchItem($path, $options = array()) { $fullPath = $this->_getFullPath($path, $options); try { if (!empty($options[self::FETCH_STREAM])) { return $this->_s3->getObjectStream($fullPath, $options[self::FETCH_STREAM]); } else { return $this->_s3->getObject($fullPath); } } catch (Zend\Service\Amazon\S3\Exception $e) { throw new Exception\RuntimeException('Error on fetch: ' . $e->getMessage(), $e->getCode(), $e); } }