public function openDownloadStream($id)
    {
        $file = $this->collectionWrapper->findFileById($id);

        if ($file === null) {
            throw FileNotFoundException::byId($id, $this->getFilesNamespace());
        }

        return $this->openDownloadStreamByFile($file);
    }
public function openDownloadStream($id)
    {
        $file = $this->collectionWrapper->findFileById($id);

        if ($file === null) {
            throw FileNotFoundException::byId($id, $this->getFilesNamespace());
        }

        return $this->openDownloadStreamByFile($file);
    }
public function openDownloadStream ( $ id ) { $ file = $ this -> collectionWrapper -> findFileById ( $ id ) ; if ( $ file === null ) { throw FileNotFoundException :: byId ( $ id , $ this -> getFilesNamespace ( ) ) ; } return $ this -> openDownloadStreamByFile ( $ file ) ; }
Opens a readable stream for reading a GridFS file.

@param mixed $id File ID
@return resource
@throws FileNotFoundException if no file could be selected
@throws DriverRuntimeException for other driver errors (e.g. connection errors)
Opens a readable stream for reading a GridFS file .