(PECL mongo >=1.3.0)
A extensão que define essa classe está obsoleta. Alternativamente utilize a extensão MongoDB deve ser utilizada. Alternativas a essa classe incluem:
A connection manager for PHP and MongoDB.
This class is used to create and manage connections. A typical use is:
Exemplo #1 MongoClient basic usage
<?php
$m = new MongoClient(); // connect
$db = $m->foo; // get the database named "foo"
?>
See MongoClient::__construct() and the section on connecting for more information about creating connections.
NULL
;NULL
;$server = "mongodb://localhost:27017"
[, array $options = array("connect" => TRUE)
[, array $driver_options
]]] )MongoClient::VERSIONMongoClient::DEFAULT_HOSTMongoClient::DEFAULT_PORTMongoClient::RP_PRIMARYMongoClient::RP_PRIMARY_PREFERREDMongoClient::RP_SECONDARYMongoClient::RP_SECONDARY_PREFERREDMongoClient::RP_NEAREST
This property will be set to TRUE if we have a open connection to
the database, FALSE otherwise. If the connection is to a replica set,
this property will only be TRUE if the driver has a connection to a
node matching the current read preference. This property does not take
authentication into account.
This property is deprecated since version 1.5.0.
This property is no longer used and will be set to NULL In driver
versions 1.1.x and earlier, this may be set to a string value (e.g.
"recycled", "new") when persistent
connections are used.
This property is deprecated since version 1.5.0.