本页内容
MongoDB\Collection::getCollectionName()
返回此集合的名称。
function getCollectionName(): string
此集合名称作为字符串。
以下代码返回数据库中 test 的 zips 集合的名称。
test
zips
<?php$collection = (new MongoDB\Client)->test->zips;echo $collection->getCollectionName();
输出结果将类似于
MongoDB\Collection::getDatabaseName()
MongoDB\Collection::getNamespace()
返回
findOneAndUpdate()
下一页
getDatabaseName()