private function getConfigVariable($var, $default = null)
    {

        if (preg_match("/^SW_/", $var)) {
            $var = strtolower(preg_replace("/SW_/", "", $var));
        }

        if (isset($this->variables["config"][$var])) {
            return $this->variables["config"][$var];
        } else {
            if (defined("SW_" . strtoupper($var))) {
                return constant("SW_" . strtoupper($var));
            }
        }

        return $default;

    }
private function getConfigVariable($var, $default = null)
    {

        if (preg_match("/^SW_/", $var)) {
            $var = strtolower(preg_replace("/SW_/", "", $var));
        }

        if (isset($this->variables["config"][$var])) {
            return $this->variables["config"][$var];
        } else {
            if (defined("SW_" . strtoupper($var))) {
                return constant("SW_" . strtoupper($var));
            }
        }

        return $default;

    }
private function getConfigVariable ( $ var , $ default = null ) { if ( preg_match ( "/^SW_/" , $ var ) ) { $ var = strtolower ( preg_replace ( "/SW_/" , "" , $ var ) ) ; } if ( isset ( $ this -> variables [ "config" ] [ $ var ] ) ) { return $ this -> variables [ "config" ] [ $ var ] ; } else { if ( defined ( "SW_" . strtoupper ( $ var ) ) ) { return constant ( "SW_" . strtoupper ( $ var ) ) ; } } return $ default ; }
Return the value of a config variable

If the config variable doesn't exist, a default value is returned

@param mixed $var Variable name
@param mixed $default Default value

@return mixed Variable value
Return the value of a config variable