public static function CSSCompression::modes in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/CSSCompression.inc \CSSCompression::modes()
Creates a new mode, or overwrites existing mode
Parameters
(mixed) mode: Name of the mode, or array of modes:
(array) config: Configuration of the mode:
1 call to CSSCompression::modes()
- CSSCompression_Option::merge in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Option.inc - Extend like function to merge an array of preferences into the options array.
File
- advagg_css_compress/
css-compressor-3.x/ src/ CSSCompression.inc, line 274
Class
Code
public static function modes($mode = NULL, $config = NULL) {
if ($mode === NULL) {
return self::$modes;
}
else {
if (is_array($mode)) {
return array_merge(self::$modes, $mode);
}
else {
if ($config === NULL) {
return isset(self::$modes[$mode]) ? self::$modes[$mode] : NULL;
}
else {
return self::$modes[$mode] = $config;
}
}
}
}