Same name in other branches
  1. 6.0.x advagg_js_minify/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
  2. 7.x-2.x advagg_js_compress/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
  3. 8.x-2.x advagg_js_minify/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
  4. 8.x-3.x advagg_js_minify/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
  5. 8.x-4.x advagg_js_minify/jsqueeze.inc \Patchwork\JSqueeze::getNewName()

Fichier

advagg_js_minify/jsqueeze.inc, line 924

Classe

JSqueeze

Namespace

Patchwork

Code

protected function getNewName($m) {
    $m = $m[0];
    $pre = '.' === $m[0] ? '.' : '';
    $post = '';
    if (',' === $m[0] || '{' === $m[0] || ' ' === $m[0]) {
        $pre = $m[0];
        if (':' === substr($m, -1)) {
            $post = ':';
            $m = (' ' !== $m[0] ? '.' : '') . substr($m, 1, -1);
        }
        else {
            $m = substr($m, 1);
        }
    }
    else {
        if (':' === substr($m, -1)) {
            $post = ':';
            $m = substr($m, 0, -1);
        }
    }
    $post = (isset($this->reserved[$m]) ? 'true' === $m ? '!0' : ('false' === $m ? '!1' : $m) : (isset($this->local_tree[$m]) ? $this->local_tree[$m] : (isset($this->used_tree[$m]) ? $this->used_tree[$m] : $m))) . $post;
    return '' === $post ? '' : $pre . ('.' === $post[0] ? substr($post, 1) : $post);
}