MongoWriteConcernException::getDocument

(PECL mongo >= 1.5.0) Get the error document public array MongoWriteConcernException::getDocument ( void ) Returns the actual response from the server that was interperated as an error. Returns: A MongoDB document, if available, as an array.

MongoCursorException::getHost

(PECL mongo >= 1.0.0) The hostname of the server that encountered the error public string MongoCursorException::getHost ( void ) Returns the hostname of the server the query was sent too. Returns: Returns the hostname, or NULL if the hostname is unknown.

MongoResultException::getDocument

(PECL mongo >=1.3.0) Retrieve the full result document public array MongoResultException::getDocument ( void ) Retrieves the full error result document. Returns: The full result document as an array, including partial data if available and additional keys. Examples: MongoResultException::getDocument() example <?php

Mongo::switchSlave

(PECL mongo >=1.1.0) Choose a new secondary for slaveOkay reads public string Mongo::switchSlave ( void ) This choses a random secondary for a connection to read from. It is called automatically by the driver and should not need to be used. It calls MongoClient::getHosts() (to refresh the status of hosts) and Mongo::getSlave() (to get the return value). See the query section of this manual for information on distributin

Mongo::setSlaveOkay

(PECL mongo >=1.1.0) Change slaveOkay setting for this connection public bool Mongo::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 MongoClient instance. Ret

Mongo::setPoolSize

(PECL mongo >=1.2.0) Set the size for future connection pools. public static bool Mongo::setPoolSize ( int $size ) Sets the max number of connections new pools will be able to create. Parameters: size The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections. R

Mongo::poolDebug

(PECL mongo >=1.2.0) Returns information about all connection pools. public array Mongo::poolDebug ( void ) Returns an array of information about all connection pools. Returns: Each connection pool has an identifier, which starts with the host. For each pool, this function shows the following fields: in use The number of connections currently being used by MongoClient instances. in pool

Mongo::getSlaveOkay

(PECL mongo >=1.1.0) Get slaveOkay setting for this connection public bool Mongo::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. Exception: Issues E_DEPRECATED warning Changelog: 1.2.11 Emits E_DEPRE

Mongo::getSlave

(PECL mongo >=1.1.0) Returns the address being used by this for slaveOkay reads public string Mongo::getSlave ( void ) This finds the address of the secondary currently being used for reads. It is a read-only method: it does not change anything about the internal state of the object. When you create a connection to the database, the driver will not immediately decide on a secondary to use. Thus, after you connect, this

Mongo::getPoolSize

(PECL mongo >=1.2.0) Get pool size for connection pools public static int Mongo::getPoolSize ( void ) Returns: Returns the current pool size. This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::getSize() instead. Changelog: 1.2.11