Пример #1
0
 /**
  * 构造查询
  *
  * @param Mongo $mongo MongoDB连接
  * @param string $db 数据库
  * @param string $collection 集合
  */
 function __construct(RMongo $mongo, $db, $collection)
 {
     $this->_dbName = $db;
     $this->_collectionName = $collection;
     $this->_db = $mongo->selectDB($this->_dbName);
     $this->_collection = $mongo->selectCollection($this->_dbName, $this->_collectionName);
 }