예제 #1
0
 /**
  * @return \MongoDB\Database
  */
 private function createDatabaseObject()
 {
     $options = ['readPreference' => $this->readPreference, 'writeConcern' => $this->writeConcern];
     if ($this->db === null) {
         $this->db = $this->connection->getClient()->selectDatabase($this->name, $options);
     } else {
         $this->db = $this->db->withOptions($options);
     }
 }