public static function getConfigValue( $config, $key, $default = NULL )
	{
		if( !isset( $config[$key] ) )
			return $default;
		$value	= trim( $config[$key] );
		if( preg_match( '/^[A-Z_]+$/', $value ) )
			$value	= constant( $value );
		else if( preg_match( '/^[0-9]+$/', $value ) )
			$value	= (int) $value;
		else if( preg_match( '/^[0-9.]+$/', $value ) )
			$value	= (real) $value;
		else if( empty( $value ) )
			return $default;
		return $value;
	}