Optional collection name prefix.

* @param mixed $chunks [optional] * @return MongoGridFS */ public function __construct($db, $prefix = "fs", $chunks = "fs") {} /** * Drops the files and chunks collections * @link http://php.net/manual/en/mongogridfs.drop.php * @return array The database response */ public function drop() {} /** * @link http://php.net/manual/en/mongogridfs.find.php * @param array $query The query * @param array $fields Fields to return * @return MongoGridFSCursor A MongoGridFSCursor */ public function find(array $query = array(), array $fields = array()) {} /** * Stores a file in the database * @link http://php.net/manual/en/mongogridfs.storefile.php * @param string $filename The name of the file * @param array $extra Other metadata to add to the file saved * @param array $options Options for the store. "safe": Check that this store succeeded * @return mixed Returns the _id of the saved object */ public function storeFile($filename, $extra = array(), $options = array()) {} /** * Chunkifies and stores bytes in the database * @link http://php.net/manual/en/mongogridfs.storebytes.php * @param string $bytes A string of bytes to store * @param array $extra Other metadata to add to the file saved * @param array $options Options for the store. "safe": Check that this store succeeded * @return mixed The _id of the object saved */ public function storeBytes($bytes, $extra = array(), $options = array()) {} /** * Returns a single file matching the criteria * @link http://www.php.net/manual/en/mongogridfs.findone.php * @param array $query The fields for which to search. * @param array $fields Fields of the results to return. * @return MongoGridFSFile|null */ public function findOne(array $query = array(), array $fields = array()) {} /** * Removes files from the collections * @link http://www.php.net/manual/en/mongogridfs.remove.php * @param array $criteria Description of records to remove. * @param array $options Options for remove. Valid options are: "safe"- Check that the remove succeeded. * @throws MongoCursorException * @return boolean */ public function remove(array $criteria = array(), array $options = array()) {} /** * Delete a file from the database * @link http://php.net/manual/en/mongogridfs.delete.php * @param mixed $id _id of the file to remove * @return boolean Returns true if the remove was successfully sent to the database. */ public function delete($id) {} /** * Saves an uploaded file directly from a POST to the database * @link http://www.php.net/manual/en/mongogridfs.storeupload.php * @param string $name The name attribute of the uploaded file, from . * @param array $metadata An array of extra fields for the uploaded file. * @return mixed Returns the _id of the uploaded file. */ public function storeUpload($name, array $metadata = array()) {} /** * Retrieve a file from the database * @link http://www.php.net/manual/en/mongogridfs.get.php * @param mixed $id _id of the file to find. * @return MongoGridFSFile|null Returns the file, if found, or NULL. */ public function __get($id) {} /** * Stores a file in the database * @link http://php.net/manual/en/mongogridfs.put.php * @param string $filename The name of the file * @param array $extra Other metadata to add to the file saved * @return mixed Returns the _id of the saved object */ public function put($filename, array $extra = array()) {} }