메소드 |
설명 |
|
__construct ( MongoDB $db, string $prefix = "fs", mixed $chunks = null ) |
Files as stored across two collections, the first containing file meta
information, the second containing chunks of the actual file. By default,
fs.files and fs.chunks are the collection names used. |
|
__sleep ( ) : array |
|
|
delete ( mixed $id ) : boolean |
Delete a file from the database |
|
drop ( ) : array |
Drops the files and chunks collections |
|
find ( array $query = [], array $fields = [] ) : MongoGridFSCursor |
|
|
findOne ( mixed $query = [], array $fields = [], array $options = [] ) : MongoGridFSFile | null |
Returns a single file matching the criteria |
|
get ( mixed $id ) : MongoGridFSFile | null |
Retrieve a file from the database |
|
put ( string $filename, array $extra = [], array $options = [] ) : mixed |
Stores a file in the database |
|
remove ( array $criteria = [], array $options = [] ) : boolean |
Removes files from the collections |
|
storeBytes ( string $bytes, array $extra = [], array $options = [] ) : mixed |
Chunkifies and stores bytes in the database |
|
storeFile ( string $filename, array $extra = [], array $options = [] ) : mixed |
Stores a file in the database |
|
storeUpload ( string $name, array $metadata = [] ) : mixed |
Saves an uploaded file directly from a POST to the database |
|