public function getConfig($key = null, $default = null)
    {
        $name = $this->current ?: 'default';

        $configs = $this->configs[$name];
        if ($key === null) {
            return $configs;
        }

        return isset($configs[$key]) ? $configs[$key] : $default;
    }
public function getConfig($key = null, $default = null)
    {
        $name = $this->current ?: 'default';

        $configs = $this->configs[$name];
        if ($key === null) {
            return $configs;
        }

        return isset($configs[$key]) ? $configs[$key] : $default;
    }
public function getConfig ( $ key = null , $ default = null ) { $ name = $ this -> current ? : 'default' ; $ configs = $ this -> configs [ $ name ] ; if ( $ key === null ) { return $ configs ; } return isset ( $ configs [ $ key ] ) ? $ configs [ $ key ] : $ default ; }
Get current connection config by key
@param  string $key Config key
@param mixed $default
@return mixed
Get current connection config by key