コード例 #1
0
ファイル: MongaCollection.php プロジェクト: vgrish/tacit
 /**
  * Get a MongaCollection instance.
  *
  * @param string $name
  * @param Database $connection
  *
  * @return MongaCollection
  */
 public function __construct($name, $connection)
 {
     $this->name = $name;
     $this->connection = $connection;
     $this->peer = $connection->collection($this->name);
 }
コード例 #2
0
 /**
  * @param $name
  *
  * @return Monga\Collection
  */
 public function collection($name)
 {
     return $this->database->collection($name);
 }