You are viewing an offline version of MongoDB documentation. Some page features might be unavailable. To view the latest version of the page or use interactive features, visit the live page.
MongoDB\Model\CollectionInfo::getName()
Definition
Return Values
The collection name. This corresponds to the name field returned in the
listCollections command reply.
Examples
$info = new CollectionInfo(['name' => 'foo']); echo $info->getName();
The output would then resemble:
foo
See Also
listCollections command reference in the MongoDB manual