protected function JSqueeze::getNewName in Advanced CSS/JS Aggregation 8.2
Same name and namespace in other branches
- 8.4 advagg_js_minify/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
- 8.3 advagg_js_minify/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
- 7.2 advagg_js_compress/jsqueeze.inc \Patchwork\JSqueeze::getNewName()
File
- advagg_js_minify/
jsqueeze.inc, line 924
Class
Namespace
PatchworkCode
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);
}