public function setConnection($pHost, $pName, $pUser = NULL, $pPassword = NULL)
    {
        $this->_connection = $this->connect($pHost, $pName, $pUser, $pPassword);
        $this->_dbName = $pName;
        return $this;
    }
public function setConnection($pHost, $pName, $pUser = NULL, $pPassword = NULL)
    {
        $this->_connection = $this->connect($pHost, $pName, $pUser, $pPassword);
        $this->_dbName = $pName;
        return $this;
    }
public function setConnection ( $ pHost , $ pName , $ pUser = NULL , $ pPassword = NULL ) { $ this -> _connection = $ this -> connect ( $ pHost , $ pName , $ pUser , $ pPassword ) ; $ this -> _dbName = $ pName ; return $ this ; }
Connect to database and register the connection.

@param string $pHost
@param string $pName
@param null|string $pUser
@param null|string $pPassword
@return Db
Connect to database and register the connection .