public function CSSCompression_Control::__construct in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 6 advagg_css_compress/css-compressor-3.x/src/lib/Control.inc \CSSCompression_Control::__construct()
Pull in the Compression instance and build the subclasses
Parameters
(class) CSSCompression: CSSCompression Instance:
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Control.inc, line 76
Class
- CSSCompression_Control
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
public function __construct(CSSCompression $CSSCompression) {
$this->CSSCompression = $CSSCompression;
// Load all subclasses on demand
if (!class_exists("CSSCompression_Option", false)) {
$path = dirname(__FILE__) . '/';
foreach ($this->subclasses as $class) {
require DRUPAL_ROOT . '/' . $path . $class . '.inc';
}
}
// Initialize each subclass
foreach ($this->subclasses as $class) {
$full = "CSSCompression_{$class}";
$this->{$class} = new $full($this);
}
}