バージョン 1.9 以降非推奨。
定義
- MongoDB\Model\CollectionInfo::getCappedMax()
- Capped コレクションのドキュメント制限を返します。 これは、 - MongoDB\Database::createCollection()の- maxオプションと相関します。- function getCappedMax(): integer|null 
Return Values
Capped コレクションのドキュメント数。 コレクションに上限が設けられていない場合は、 nullが返されます。
このメソッドは非推奨となり、代わりにMongoDB\Model\CollectionInfo::getOptions()を使用し、 maxキーにアクセスします。
例
$db = (new MongoDB\Client)->test; // Creates a capped collection with a document limit of 100 $db->createCollection(    'myCappedCollection',    ['capped' => true, 'size' => 1048576, 'max' => 100] ); // Retrieves the document limit for the capped collection foreach ($db->listCollections(['filter' => ['name' => 'myCappedCollection']]) as $info) {    var_dump($info->getCappedMax()); } 
出力は次のようになります。
int(100)