Skip to content

Commit

Permalink
Added selectDB
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammaye committed Oct 27, 2014
1 parent 8ef8231 commit 8a379eb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions EMongoClient.php
Expand Up @@ -249,6 +249,17 @@ public function setDB($name)
$this->_db = $this->getConnection ()->selectDb ( $name );
}

/**
* Selects a different database
* @param $name
* @return MongoDB
*/
public function selectDB($name)
{
$this->setDB($name);
return $this->getDB();
}

/**
* Gets the raw Database
* @return MongoDB
Expand Down

0 comments on commit 8a379eb

Please sign in to comment.