MongoGridFS::remove

(PECL mongo >=0.9.0) Remove files and their chunks from the database public bool|array MongoGridFS::remove ([ array $criteria = array() [, array $options = array() ]] ) Parameters: criteria The filename or criteria for which to search. options An array of options for the remove operations executed against the chunks and files collec

MongoGridFS::put

(PECL mongo >=1.0.8) Stores a file in the database public mixed MongoGridFS::put ( string $filename [, array $metadata = array() [, array $options = array() ]] ) Note: MongoGridFS::put() is an alias of MongoGridFS::storeFile(). Parameters: filename Name of the file to store. metadata Other metadata fields to include in the file

MongoGridFS::get

(PECL mongo >=1.0.8) Retrieve a file from the database public MongoGridFSFile MongoGridFS::get ( mixed $id ) Parameters: id _id of the file to find. Returns: Returns the file, if found, or NULL.

MongoGridFS::findOne

(PECL mongo >=0.9.0) Returns a single file matching the criteria public MongoGridFSFile MongoGridFS::findOne ([ mixed $query = array() [, mixed $fields = array() ]] ) Parameters: query The filename or criteria for which to search. Returns: Returns a MongoGridFSFile or NULL. Examples:

MongoGridFS::find

(PECL mongo >=0.9.0) Queries for files public MongoGridFSCursor MongoGridFS::find ([ array $query = array() [, array $fields = array() ]] ) Parameters: query The query. fields Fields to return. Returns: A MongoGridFSCursor.

MongoGridFS::drop

(PECL mongo >=0.9.0) Drops the files and chunks collections public array MongoGridFS::drop ( void ) Returns: The database response.

MongoGridFS::delete

(PECL mongo >=1.0.8) Remove a file and its chunks from the database public bool|array MongoGridFS::delete ( mixed $id ) Note: MongoGridFS::delete() is a convenience method for calling MongoGridFS::remove() with specific criteria and default options parameters. Parameters: id _id of the file to remove. Returns: Returns an array containing t

MongoGridFS::__construct

(PECL mongo >=0.9.0) Creates new file collections public MongoGridFS::__construct ( MongoDB $db [, string $prefix = "fs" [, mixed $chunks = "fs" ]] ) 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. Use one argument to specify a prefix other than "fs": $fs = new MongoG

MongoTimestamp::__toString

(PECL mongo >= 1.0.1) Returns a string representation of this timestamp public string MongoTimestamp::__toString ( void ) Returns the "sec" field of this timestamp. Returns: The seconds since epoch represented by this timestamp.

MongoTimestamp::__construct

(PECL mongo >= 1.0.1) Creates a new timestamp. public MongoTimestamp::__construct ([ int $sec = time() [, int $inc ]] ) Creates a new timestamp. If no parameters are given, the current time is used and the increment is automatically provided. The increment is set to 0 when the module is loaded and is incremented every time this constructor is called (without the $inc parameter passed in). Parameters: