The Singleton access method (for those that want it)

Paramètres

(string) name: Name of the stored instance:

Fichier

advagg_css_compress/css-compressor-3.x/src/CSSCompression.inc, line 352

Classe

CSSCompression

Code

public static function getInstance($name = NULL) {
    if ($name !== NULL) {
        if (!isset(self::$instances[$name])) {
            self::$instances[$name] = new self();
        }
        return self::$instances[$name];
    }
    else {
        if (!self::$instance) {
            self::$instance = new self();
        }
    }
    return self::$instance;
}