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

MongoDB\Model\CollectionInfo::isView()

2.2版本新增。

MongoDB\Model\CollectionInfo::isView()

返回该集合是否为视图。

function isView(): boolean

指示集合是否为视图的布尔值。

<?php $db = (new MongoDB\Client)->test; $db->createCollection( 'myView', ['viewOn' => 'restaurants'],); foreach ($db->listCollections(['filter' => ['name' => 'myView']]) as $info) { var_dump($info->isView());}

输出类似于以下内容:

bool(true)
给本页内容打分