MongoDB\Model\DatabaseInfo Class
For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt
MongoDB\Model\DatabaseInfo Class
Definition
This class models information about a database. Instances of this class are returned by traversing an Iterator, which is returned by the [MongoDB\Client::listDatabases()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbclient-listdatabases.md#mongodb-phpmethod-phpmethod.MongoDB-Client--listDatabases-- method.
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 [].
Note:
The [MongoDB\Model\DatabaseInfo](https://www.mongodb.com/docs/php-library/current/reference/class/mongodbmodeldatabaseinfo.md#mongodb-phpclass-phpclass.MongoDB-Model-DatabaseInfo class is immutable. Attempting to modify it via the ArrayAccess interface will result in a [MongoDB\Exception\BadMethodCallException.](https://www.mongodb.com/docs/php-library/current/reference/exception-classes.md#mongodb-phpclass-phpclass.MongoDB-Exception-BadMethodCallException
Methods
-
[
MongoDB\Model\DatabaseInfo::getName()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodeldatabaseinfo-getname.md#mongodb-phpmethod-phpmethod.MongoDB-Model-DatabaseInfo--getName-- -
[
MongoDB\Model\DatabaseInfo::getSizeOnDisk()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodeldatabaseinfo-getsizeondisk.md#mongodb-phpmethod-phpmethod.MongoDB-Model-DatabaseInfo--getSizeOnDisk-- -
[
MongoDB\Model\DatabaseInfo::isEmpty()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodeldatabaseinfo-isempty.md#mongodb-phpmethod-phpmethod.MongoDB-Model-DatabaseInfo--isEmpty--
