Exemplo n.º 1
0
 /**
  * 设定集合
  *
  * @param string $collection            
  * @param string $database            
  * @param string $cluster            
  */
 public function setCollection($collection, $database = DEFAULT_DATABASE, $cluster = DEFAULT_CLUSTER)
 {
     $this->collection = $collection;
     $this->database = $database;
     $this->cluster = $cluster;
     parent::__construct($this->config, $this->collection, $this->database, $this->cluster);
     if (method_exists($this, 'init')) {
         $this->init();
     }
 }