- Reference >
- Enumeration Classes >
- MongoDB\Model\CollectionInfo::getCappedMax()
MongoDB\Model\CollectionInfo::getCappedMax()
Deprecated since version 1.9.
On this page
Definition
-
MongoDB\Model\CollectionInfo::getCappedMax Return the document limit for the capped collection. This correlates with the
maxoption forMongoDB\Database::createCollection().
Return Values
The document limit for the capped collection. If the collection is not capped,
null will be returned.
This method is deprecated in favor of using
MongoDB\Model\CollectionInfo::getOptions() and accessing the
max key.
Examples
The output would then resemble:
int(100)
See Also
MongoDB\Model\CollectionInfo::getCappedSize()MongoDB\Model\CollectionInfo::isCapped()MongoDB\Database::createCollection()- Capped Collections in the MongoDB manual
- listCollections command reference in the MongoDB manual