定義
Return Values
Capped コレクションのドキュメント数。 コレクションに上限が設けられていない場合は、 nullが返されます。
例
$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 collectionforeach ($db->listCollections(['filter' => ['name' => 'myCappedCollection']]) as $info) { var_dump($info->getCappedMax());}出力は次のようになります。
int(100)その他の参照
MongoDB マニュアルの「 Capped コレクション」
MongoDB マニュアルのlistCollectionsコマンド参照