Method |
Description |
|
deleteFileById ( string | MongoId $id ) : GridFS |
Delete file by id |
|
getFileById ( MongoId | string | integer $id ) : GridFSFile | null |
Get file instance by id of document
Used \MongoGridFS::findOne() instead of \MongoGridFS::get() due to backward compatibility with old mongo extensions |
|
getFileClassName ( MongoGridFSFile $fileData = null ) : string |
Override to define class name of file by file data |
|
hydrate ( MongoGridFSFile $data, $useDocumentPool = true ) : Sokil\Mongo\GridFsFile |
Factory method to get document object from array of stored document |
|
storeBytes ( string $bytes, array $metadata = [] ) : MongoId |
Create file in GridFS from binary data |
|
storeFile ( string $filename, array $metadata = [] ) : MongoId |
Create file in GridFS from file in filesystem |
|