Imbo\Storage\GridFS::getImageObject PHP Method

getImageObject() private method

Get an image object
private getImageObject ( string $user, string $imageIdentifier ) : boolean | MongoGridFSFile
$user string The user which the image belongs to
$imageIdentifier string The image identifier
return boolean | MongoGridFSFile Returns false if the file does not exist or an instance of MongoGridFSFile if the file exists
    private function getImageObject($user, $imageIdentifier)
    {
        $cursor = $this->getGrid()->find(['user' => $user, 'imageIdentifier' => $imageIdentifier]);
        if ($cursor->count()) {
            return $cursor->getNext();
        }
        return false;
    }