Example #1
0
 /**
  * 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);
 }
 /**
  * @param $name
  *
  * @return Monga\Collection
  */
 public function collection($name)
 {
     return $this->database->collection($name);
 }