src/UI/Image/Graph/Components.php
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;
	}
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;
	}
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 ; }
Returns the interpreted Value of a Configuration Parameter.
@access		public
@static
@param		array		$config			Configuration Data
@param		string		$key			Parameter Key
@param		mixed		$default		Default Value to set if empty or not set
@return		mixed
Returns the interpreted Value of a Configuration Parameter .