Phalcon\Db\Adapter\MongoDB\GridFS\Bucket::openDownloadStreamByFile PHP Method

openDownloadStreamByFile() private method

Opens a readable stream for the GridFS file.
private openDownloadStreamByFile ( stdClass $file ) : resource
$file stdClass GridFS file document
return resource
    private function openDownloadStreamByFile(stdClass $file)
    {
        $path = $this->createPathForFile($file);
        $context = stream_context_create([self::$streamWrapperProtocol => ['collectionWrapper' => $this->collectionWrapper, 'file' => $file]]);
        return fopen($path, 'r', false, $context);
    }