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

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.

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

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.

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::__construct

(PECL mongo >=0.9.0) The __construct purpose public Mongo::__construct ([ string $server [, array $options ]] ) This method overwrites the MongoClient constructor and turns off acknowledged writes. Please see MongoClient::__construct() for description of the parameters. Exception: Instanciating this class will emit E_DEPRECATED warning, and turn off acknowledged writes. Please use the MongoC

Mongo::connectUtil

(PECL mongo >=0.9.0) Connects with a database server protected bool Mongo::connectUtil ( void ) Returns: If the connection was successful. This is an internal function that you should never call yourself. Exception: Throws MongoConnectionException if it fails to connect to the databases.

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::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

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