Pull in the Compression instance and build the subclasses
Paramètres
(class) CSSCompression: CSSCompression Instance:
Fichier
-
advagg_css_compress/
css-compressor-3.x/ src/ lib/ Control.inc, line 76
Classe
- 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);
}
}