private getImageObject ( string $user, string $imageIdentifier ) : boolean | MongoGridFSFile | ||
$user | string | The user which the image belongs to |
$imageIdentifier | string | The image identifier |
리턴 | 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;
}