Same name in other branches
  1. 5.0.x advagg_js_minify/jspacker.inc \ParseMaster::exec()
  2. 6.0.x advagg_js_minify/jspacker.inc \ParseMaster::exec()
  3. 7.x-1.x advagg_js_compress/jspacker.inc \ParseMaster::exec()
  4. 7.x-2.x advagg_js_compress/jspacker.inc \ParseMaster::exec()
  5. 8.x-2.x advagg_js_minify/jspacker.inc \ParseMaster::exec()
  6. 8.x-3.x advagg_js_minify/jspacker.inc \ParseMaster::exec()

File

advagg_js_minify/jspacker.inc, line 633

Class

ParseMaster

Code

public function exec($string) {
    // execute the global replacement
    $this->_escaped = array();
    // simulate the _patterns.toSTring of Dean
    $regexp = '/';
    foreach ($this->_patterns as $reg) {
        $regexp .= '(' . substr($reg[self::EXPRESSION], 1, -1) . ')|';
    }
    $regexp = substr($regexp, 0, -1) . '/';
    $regexp .= $this->ignoreCase ? 'i' : '';
    $string = $this->_escape($string, $this->escapeChar);
    $string = preg_replace_callback($regexp, array(
        &$this,
        '_replacement',
    ), $string);
    $string = $this->_unescape($string, $this->escapeChar);
    return preg_replace($this->DELETED, '', $string);
}