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::getInfo()
New in version 1.9.
Definition
Return Values
An array containing extra information about the collection. This corresponds to
the info field returned in the listCollections command reply.
Examples
$info = new CollectionInfo([ 'type' => 'view', 'name' => 'foo', 'info' => ['readOnly' => true] ]); var_dump($info->getInfo());
The output would then resemble:
array(1) { ["readOnly"]=> bool(true) }
See Also
listCollections command reference in the MongoDB manual