public function checkParams(array $params, &$error = null)
    {
        $result = array();
        foreach ($this->paramsReq as $param) {
            if (!array_key_exists($param, $params)) {
                $error = 'required '.$param;
                return false;
            }
            $result[$param] = $params[$param];
        }
        foreach ($this->paramsDefault as $param => $default) {
            if (array_key_exists($param, $params)) {
                $result[$param] = $params[$param];
            } else {
                $result[$param] = $default;
            }
        }
        return $result;
    }
public function checkParams(array $params, &$error = null)
    {
        $result = array();
        foreach ($this->paramsReq as $param) {
            if (!array_key_exists($param, $params)) {
                $error = 'required '.$param;
                return false;
            }
            $result[$param] = $params[$param];
        }
        foreach ($this->paramsDefault as $param => $default) {
            if (array_key_exists($param, $params)) {
                $result[$param] = $params[$param];
            } else {
                $result[$param] = $default;
            }
        }
        return $result;
    }
public function checkParams ( array $ params , & $ error = null ) { $ result = array ( ) ; foreach ( $ this -> paramsReq as $ param ) { if ( ! array_key_exists ( $ param , $ params ) ) { $ error = 'required ' . $ param ; return false ; } $ result [ $ param ] = $ params [ $ param ] ; } foreach ( $ this -> paramsDefault as $ param => $ default ) { if ( array_key_exists ( $ param , $ params ) ) { $ result [ $ param ] = $ params [ $ param ] ; } else { $ result [ $ param ] = $ default ; } } return $ result ; }
Validates and normalizes connection parameters

@param array $params
@param string $error
@return array
normalized parameters or FALSE if parameters is invalid
Validates and normalizes connection parameters