(PECL mongo >=0.9.0)
MongoCollection::getName — Returns this collection's name
This function has no parameters.
Returns the name of this collection.
Example #1 MongoCollection::getName() example
<?php
$m = new Mongo();
$c = $m->selectDB("foo")->selectCollection("bar.baz");
echo "Working with collection " . $c->getName() . ".";
?>
The above example will output something similar to:
Working with collection bar.baz.