Definition
Return Values
The collection name. This corresponds to the name field returned in the
listCollections command reply.
Examples
$db->createCollection('foo'); // Retrieves the collection name foreach ($db->listCollections(['filter' => ['name' => 'foo']]) as $info) {    echo $info->getName(); } 
The output would then resemble:
foo 
See Also
- listCollections command reference in the MongoDB manual