Nuevo en la versión 1.9.
Definición
Return Values
Una matriz que contiene información adicional sobre la colección. Corresponde al campo info devuelto en la respuesta del comando listCollections.
Ejemplos
$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()); }
El resultado sería entonces similar a lo siguiente:
array(1) { ["readOnly"]=> bool(true) }
Ver también
Referencia del comandolistCollections en el manual de MongoDB