Builds the subclasses, runs the compression if css passed, and merges options
Parameters
(string) css: CSS to compress on initialization if needed:
(array) options: Array of preferences to override the defaults:
File
-
advagg_css_compress/
css-compressor-3.x/ src/ CSSCompression.inc, line 216
Class
Code
public function __construct($css = NULL, $options = NULL) {
$this->Control = new CSSCompression_Control($this);
// Autorun against css passed
if ($css) {
// Allow passing options/mode only
if (is_array($css) || array_key_exists($css, self::$modes)) {
$this->Control->Option
->merge($css);
}
else {
$this->Control
->compress($css, $options);
}
}
else {
if ($options) {
$this->Control->Option
->merge($options);
}
}
}