Docs Menu

Docs HomePHP Library Manual

MongoDB\Model\DatabaseInfo Class


This class models information about a database. Instances of this class are returned by traversing a MongoDB\Model\DatabaseInfoIterator, which is returned by MongoDB\Client::listDatabases().

Changed in version 1.4: This class implements PHP's ArrayAccess interface. This provides a mechanism for accessing index fields for which there exists no helper method. isset() may be used to check for the existence of a field before accessing it with [].


The MongoDB\Model\DatabaseInfo class is immutable. Attempting to modify it via the ArrayAccess interface will result in a MongoDB\Exception\BadMethodCallException.

←  MongoDB\Model\CollectionInfoIterator ClassMongoDB\Model\DatabaseInfo::getName() →