lib/private/Files/ObjectStore/Swift.php
/**
	 * @param string $urn the unified resource name used to identify the object
	 * @return resource stream with the read data
	 * @throws Exception from openstack lib when something goes wrong
	 */
@param string $urn the unified resource name used to identify the object
@return resource stream with the read data
@throws Exception from openstack lib when something goes wrong
@param string $urn the unified resource name used to identify the object @return resource stream with the read data @throws Exception from openstack lib when something goes wrong
public function readObject($urn) {
		$this->init();
		$object = $this->container->getObject($urn);
		$objectContent = $object->getContent();
		$objectContent->rewind();
		$stream = $objectContent->getStream();
		stream_context_set_option($stream, 'swift', 'content', $objectContent);
		return $stream;
	}
public function readObject ( $ urn ) { $ this -> init ( ) ; $ object = $ this -> container -> getObject ( $ urn ) ; $ objectContent = $ object -> getContent ( ) ; $ objectContent -> rewind ( ) ; $ stream = $ objectContent -> getStream ( ) ; stream_context_set_option ( $ stream , 'swift' , 'content' , $ objectContent ) ; return $ stream ; }
@param string $urn the unified resource name used to identify the object
 @return resource stream with the read data
 @throws Exception from openstack lib when something goes wrong
@param string $urn the unified resource name used to identify the object @return resource stream with the read data @throws Exception from openstack lib when something goes wrong
// we need to keep a reference to objectContent or // the stream will be closed before we can do anything with it /** @var $objectContent \Guzzle\Http\EntityBody * */ // save the object content in the context of the stream to prevent it being gc'd until the stream is closed