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.

MongoPool::setSize

(PECL mongo >= 1.2.3) Set the size for future connection pools. public static bool MongoPool::setSize ( 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.

MongoPool::info

(PECL mongo >= 1.2.3) Returns information about all connection pools. public array MongoPool::info ( 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 Mongo instances. in pool Th

MongoPool::getSize

(PECL mongo >= 1.2.3) Get pool size for connection pools public static int MongoPool::getSize ( void ) Returns: Returns the current pool size. Changelog: 1.2.11 Emits E_DEPRECATED when used. Examples: Changing pool size This returns the default pool size, sets a new pool size, then

MongoLog::setModule

(PECL mongo >= 1.2.3) Sets the module(s) to be logged public static void MongoLog::setModule ( int $module ) This function can be used to set which driver modules should be logged. The MongoLog module constants may be used with bitwise operators to specify multiple modules. <?php // first, specify a logging level MongoLog::setLevel(MongoLog::ALL); // log replica set activity MongoLog::setModule(MongoLog::RS); //

MongoLog::setLevel

(PECL mongo >= 1.2.3) Sets the level(s) to be logged public static void MongoLog::setLevel ( int $level ) This function can be used to control logging verbosity and the types of activities that should be logged. The MongoLog level constants may be used with bitwise operators to specify multiple levels. <?php // first, specify a logging module MongoLog::setModule(MongoLog::CON); // log messages for every level Mon

MongoLog::setCallback

(PECL mongo >= 1.3.0) Sets a callback function to be invoked for events public static void MongoLog::setCallback ( callable $log_function ) This function will set a callback function to be invoked for events in lieu of emitting of PHP notice. Parameters: log_function The callback function to be invoked on events. It should have the following prototype: log_function

MongoLog::getModule

(PECL mongo >= 1.2.3) Gets the module(s) currently being logged public static int MongoLog::getModule ( void ) This function can be used to see which driver modules are currently being logged. The returned integer may be compared with the MongoLog module constants using bitwise operators to check if specific modules are being logged. <?php if (MongoLog::getModule() & MongoLog::RS) {     echo "logging replica se

MongoLog::getLevel

(PECL mongo >= 1.2.3) Gets the level(s) currently being logged public static int MongoLog::getLevel ( void ) This function can be used to see which log levels are currently enabled. The returned integer may be compared with the MongoLog level constants using bitwise operators to check for specific log levels. <?php if (MongoLog::getLevel() & MongoLog::FINE) {     echo "lots of logs\n"; } if (MongoLog::getLevel