- Reference >
- Enumeration Classes
Enumeration Classes
On this page
MongoDB\Model\CollectionInfo
Definition
-
MongoDB\Model\CollectionInfo This class models information about a collection. Instances of this class are returned by traversing a
MongoDB\Model\CollectionInfoIterator, which is returned byMongoDB\Database::listCollections().
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.
Methods
- MongoDB\Model\CollectionInfo::getCappedMax()
- MongoDB\Model\CollectionInfo::getCappedSize()
- MongoDB\Model\CollectionInfo::getIdIndex()
- MongoDB\Model\CollectionInfo::getInfo()
- MongoDB\Model\CollectionInfo::getName()
- MongoDB\Model\CollectionInfo::getOptions()
- MongoDB\Model\CollectionInfo::getType()
- MongoDB\Model\CollectionInfo::isCapped()
MongoDB\Model\CollectionInfoIterator
Definition
-
MongoDB\Model\CollectionInfoIterator This interface extends PHP’s Iterator interface. An instance of this interface is returned by
MongoDB\Database::listCollections().
Methods
This interface adds no new methods to Iterator, but specifies that current() will return an instance of
MongoDB\Model\CollectionInfo.
MongoDB\Model\DatabaseInfo
Definition
-
MongoDB\Model\DatabaseInfo This class models information about a database. Instances of this class are returned by traversing a
MongoDB\Model\DatabaseInfoIterator, which is returned byMongoDB\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 [].
Note
The MongoDB\Model\DatabaseInfo class is immutable. Attempting
to modify it via the ArrayAccess interface will
result in a MongoDB\Exception\BadMethodCallException.
MongoDB\Model\DatabaseInfoIterator
Definition
-
MongoDB\Model\DatabaseInfoIterator This interface extends PHP’s Iterator interface. An instance of this interface is returned by
MongoDB\Client::listDatabases().
Methods
This interface adds no new methods to Iterator, but specifies that current() will return an instance of
MongoDB\Model\DatabaseInfo.
MongoDB\Model\IndexInfo
-
MongoDB\Model\IndexInfo This class models information about an index. Instances of this class are returned by traversing a
MongoDB\Model\IndexInfoIterator, which is returned byMongoDB\Collection::listIndexes().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\IndexInfoclass is immutable. Attempting to modify it via the ArrayAccess interface will result in aMongoDB\Exception\BadMethodCallException.
Methods
- MongoDB\Model\IndexInfo::getKey()
- MongoDB\Model\IndexInfo::getName()
- MongoDB\Model\IndexInfo::getNamespace()
- MongoDB\Model\IndexInfo::getVersion()
- MongoDB\Model\IndexInfo::is2dSphere()
- MongoDB\Model\IndexInfo::isGeoHaystack()
- MongoDB\Model\IndexInfo::isSparse()
- MongoDB\Model\IndexInfo::isText()
- MongoDB\Model\IndexInfo::isTtl()
- MongoDB\Model\IndexInfo::isUnique()
MongoDB\Model\IndexInfoIterator
Definition
-
MongoDB\Model\IndexInfoIterator This interface extends PHP’s Iterator interface. An instance of this interface is returned by
MongoDB\Collection::listIndexes().
Methods
This interface adds no new methods to Iterator, but specifies that current() will return an instance of
MongoDB\Model\IndexInfo.