MongoCollection::getName

(PECL mongo >=0.9.0)

MongoCollection::getName锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷系锟斤拷锟斤拷锟�

说锟斤拷

public MongoCollection::getName ( void ) : string

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷取锟斤拷锟斤拷锟斤拷系锟斤拷锟斤拷啤锟�

锟斤拷锟斤拷

Example #1 MongoCollection::getName() 锟斤拷锟斤拷

<?php

$m 
= new MongoClient();
$c $m->foo->bar->baz;

echo 
"Working with collection " $c->getName() . ".\n";

// the full namespace is given by the MongoCollection::__toString() method
echo "Working in namespace $c.\n";

?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

Working with collection bar.baz.
Working in namespace foo.bar.baz.