public static function filterConfig(array $config, $target = 'PHP')
	{
		$filteredConfig = [];
		foreach ($config as $name => $value)
		{
			if ($value instanceof FilterableConfigValue)
			{
				$value = $value->filterConfig($target);
				if (!isset($value))
				{
					continue;
				}
			}
			if (is_array($value))
			{
				$value = self::filterConfig($value, $target);
			}
			$filteredConfig[$name] = $value;
		}

		return $filteredConfig;
	}
public static function filterConfig(array $config, $target = 'PHP')
	{
		$filteredConfig = [];
		foreach ($config as $name => $value)
		{
			if ($value instanceof FilterableConfigValue)
			{
				$value = $value->filterConfig($target);
				if (!isset($value))
				{
					continue;
				}
			}
			if (is_array($value))
			{
				$value = self::filterConfig($value, $target);
			}
			$filteredConfig[$name] = $value;
		}

		return $filteredConfig;
	}
public static function filterConfig ( array $ config , $ target = 'PHP' ) { $ filteredConfig = [ ] ; foreach ( $ config as $ name => $ value ) { if ( $ value instanceof FilterableConfigValue ) { $ value = $ value -> filterConfig ( $ target ) ; if ( ! isset ( $ value ) ) { continue ; } } if ( is_array ( $ value ) ) { $ value = self :: filterConfig ( $ value , $ target ) ; } $ filteredConfig [ $ name ] = $ value ; } return $ filteredConfig ; }
Recursively filter a config array to replace variants with the desired value

@param  array  $config Config array
@param  string $target Target parser
@return array          Filtered config
Recursively filter a config array to replace variants with the desired value