src/League/Monga/Connection.php
public function database($database, $wrap = true)
    {
        $database = $this->connection->{$database};

        return $wrap ? new Database($database, $this) : $database;
    }
public function database($database, $wrap = true)
    {
        $database = $this->connection->{$database};

        return $wrap ? new Database($database, $this) : $database;
    }
public function database ( $ database , $ wrap = true ) { $ database = $ this -> connection -> { $ database } ; return $ wrap ? new Database ( $ database , $ this ) : $ database ; }
Retrieve a database object from a connection

@param string $database database name
@param boolean $wrap whether to wrap in a Database object

@return Database|MongoDB
Retrieve a database object from a connection