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::getType()
New in version 1.9.
Definition
Return Values
The collection type. This corresponds to the type field returned in the
listCollections command reply.
Examples
$info = new CollectionInfo(['type' => 'collection', 'name' => 'foo']); echo $info->getType();
The output would then resemble:
collection
See Also
listCollections command reference in the MongoDB manual