定義
MongoDB\Model\CollectionInfo::isCapped()コレクションがCappedコレクションであるかどうかを返します。
function isCapped(): boolean
Return Values
コレクションが Capped コレクション かどうかを示すブール値。
例
$db = (new MongoDB\Client)->test;
// Creates a capped collection$db->createCollection( 'myCappedCollection', ['capped' => true, 'size' => 1048576]);
// Retrieves whether the collection is cappedforeach ($db->listCollections(['filter' => ['name' => 'myCappedCollection']]) as $info) { var_dump($info->isCapped());}出力は次のようになります。
bool(true)その他の参照
MongoDB マニュアルの「 Capped コレクション」
MongoDB マニュアルのlistCollectionsコマンド参照