对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

MongoDB\Model\CollectionInfo::isCapped()

MongoDB\Model\CollectionInfo::isCapped()

返回该集合是否为固定大小固定大小集合。

function isCapped(): boolean

一个布尔值,表示该集合是否为固定大小集合。

<?php $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)
给本页内容打分