For AI agents: a documentation index is available at https://www.mongodb.com/ko-kr/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs Menu

MongoDB\Model\CollectionInfo Class

MongoDB\Model\CollectionInfo

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() 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 class is immutable. Attempting to modify it via the ArrayAccess interface will result in a MongoDB\Exception\BadMethodCallException.