public getStreamByResource ( |
||
$resource | The resource to retrieve the stream for | |
return | resource | boolean | | boolean The resource stream or FALSE if the stream could not be obtained |
public function getStreamByResource(PersistentResource $resource)
{
$stream = $this->getStorage()->getStreamByResource($resource);
if ($stream !== false) {
$meta = stream_get_meta_data($stream);
if ($meta['seekable']) {
rewind($stream);
}
}
return $stream;
}