MongoCollection::setSlaveOkay

(PECL mongo >=1.1.0) Change slaveOkay setting for this collection public bool MongoCollection::setSlaveOkay ([ bool $ok = true ] ) See the query section of this manual for information on distributing reads to secondaries. Parameters: ok If reads should be sent to secondary members of a replica set for all possible queries using this MongoCollection instance.

MongoCollection::setReadPreference

(PECL mongo >=1.3.0) Set the read preference for this collection public bool MongoCollection::setReadPreference ( string $read_preference [, array $tags ] ) Parameters: read_preference The read preference mode: MongoClient::RP_PRIMARY, MongoClient::RP_PRIMARY_PREFERRED, MongoClient::RP_SECONDARY, MongoClient::RP_SECONDARY_PREFERRED, or MongoClient::RP_NEAREST.

MongoCollection::save

(PECL mongo >=0.9.0) Saves a document to this collection public mixed MongoCollection::save ( array|object $document [, array $options = array() ] ) If the object is from the database, update the existing database object, otherwise insert this object. Parameters: document Array or object to save. If an object is used, it may not have protected or private properties.

MongoCollection::remove

(PECL mongo >=0.9.0) Remove records from this collection public bool|array MongoCollection::remove ([ array $criteria = array() [, array $options = array() ]] ) Parameters: criteria Query criteria for the documents to delete. options An array of options for the remove operation. Currently available options include: "w" See Write C

MongoCollection::parallelCollectionScan

(PECL mongo >=1.5.0) Returns an array of cursors to iterator over a full collection in parallel public array[MongoCommandCursor] MongoCollection::parallelCollectionScan ( int $num_cursors ) This method returns an array of a maximum of num_cursors cursors. An iteration over one of the returned cursors results in a partial set of documents for a collection. Iteration over all the returned cursors results in getting every d

MongoCollection::insert

(PECL mongo >=0.9.0) Inserts a document into the collection public bool|array MongoCollection::insert ( array|object $document [, array $options = array() ] ) All strings sent to the database must be UTF-8. If a string is not UTF-8, a MongoException will be thrown. To insert (or query for) a non-UTF-8 string, use MongoBinData. Parameters: document An array or object

MongoCollection::group

(PECL mongo >=0.9.2) Performs an operation similar to SQL's GROUP BY command public array MongoCollection::group ( mixed $keys, array $initial, MongoCode $reduce [, array $options = array() ] ) Parameters: keys Fields to group by. If an array or non-code object is passed, it will be the key used to group results. 1.0.4+: If keys is an instance of MongoCode, keys will b

MongoCollection::getWriteConcern

(PECL mongo >=1.5.0) Get the write concern for this collection public array MongoCollection::getWriteConcern ( void ) Returns: This function returns an array describing the write concern. The array contains the values w for an integer acknowledgement level or string mode, and wtimeout denoting the maximum number of milliseconds to wait for the server to satisfy the write concern.

MongoCollection::getSlaveOkay

(PECL mongo >=1.1.0) Get slaveOkay setting for this collection public bool MongoCollection::getSlaveOkay ( void ) See the query section of this manual for information on distributing reads to secondaries. Returns: Returns the value of slaveOkay for this instance. Changelog: 1.2.11 Emits E_DEPRECATED when used.

MongoCollection::getReadPreference

(PECL mongo >=1.3.0) Get the read preference for this collection public array MongoCollection::getReadPreference ( void ) Returns: This function returns an array describing the read preference. The array contains the values type for the string read preference mode (corresponding to the MongoClient constants), and tagsets containing a list of all tag set criteria. If no tag sets were specified, tag