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
$db = (new MongoDB\Client)->test; // Creates a view with the readOnly option set to "true" $db->createCollection(    'myView',    ['viewOn' => 'myCollection'],    ['readOnly' => true] ); // Retrieves information about the collection view foreach ($db->listCollections(['filter' => ['name' => 'myView']]) as $info) {    var_dump($info->getInfo()); } 
The output would then resemble:
array(1) {   ["readOnly"]=>   bool(true) } 
See Also
- listCollections command reference in the MongoDB manual