MongoDB\Model\CollectionInfo Class
For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt
MongoDB\Model\CollectionInfo Class
Definition
This class models information about a collection. Instances of this class are returned by traversing an Iterator, which is returned by the [MongoDB\Database::listCollections()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbdatabase-listcollections.md#mongodb-phpmethod-phpmethod.MongoDB-Database--listCollections-- 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\CollectionInfo](https://www.mongodb.com/docs/php-library/current/reference/class/mongodbmodelcollectioninfo.md#mongodb-phpclass-phpclass.MongoDB-Model-CollectionInfo 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\CollectionInfo::getCappedMax()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-getcappedmax.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getCappedMax-- -
[
MongoDB\Model\CollectionInfo::getCappedSize()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-getcappedsize.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getCappedSize-- -
[
MongoDB\Model\CollectionInfo::getIdIndex()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-getidindex.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getIdIndex-- -
[
MongoDB\Model\CollectionInfo::getInfo()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-getinfo.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getInfo-- -
[
MongoDB\Model\CollectionInfo::getName()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-getname.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getName-- -
[
MongoDB\Model\CollectionInfo::getOptions()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-getoptions.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getOptions-- -
[
MongoDB\Model\CollectionInfo::getType()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-gettype.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--getType-- -
[
MongoDB\Model\CollectionInfo::isCapped()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-iscapped.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--isCapped-- -
[
MongoDB\Model\CollectionInfo::isView()](https://www.mongodb.com/docs/php-library/current/reference/method/mongodbmodelcollectioninfo-isview.md#mongodb-phpmethod-phpmethod.MongoDB-Model-CollectionInfo--isView--
