getConnection() public method

public getConnection ( ) : MongoClient
return MongoClient
 /**
  * Querys this collection
  *
  * @link http://www.php.net/manual/en/mongocollection.find.php
  * @param array $query The fields for which to search.
  * @param array $fields Fields of the results to return.
  * @return MongoCursor
  */
 public function find(array $query = [], array $fields = [])
 {
     $cursor = new MongoCursor($this->db->getConnection(), (string) $this, $query, $fields);
     $cursor->setReadPreference($this->getReadPreference());
     return $cursor;
 }
 /**
  * Querys this collection
  * @link http://www.php.net/manual/en/mongocollection.find.php
  * @param array $query The fields for which to search.
  * @param array $fields Fields of the results to return.
  * @return MongoCursor
  */
 public function find(array $query = array(), array $fields = array())
 {
     return new MongoCursor($this->db->getConnection(), (string) $this, $query, $fields);
 }