public static get_connection ()Get the Mongo database connection object. Uses your
settings from conf/config.php for the connection
info (host, name, user, pass, and set_name).
The host and database name are required, but authentication
(user and pass) settings and replica set name
(set_name) are optional.
Class to manage the connection to a MongoDB database. To specify your MongoDB settings, add the following section to
conf/config.php:Then you can either use this class directly like so:
Or use the MongoModel class to define a Mongo-based model for your data: