You are here

public function ParseMaster::exec in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 8.4 advagg_js_minify/jspacker.inc \ParseMaster::exec()
  2. 8.2 advagg_js_minify/jspacker.inc \ParseMaster::exec()
  3. 8.3 advagg_js_minify/jspacker.inc \ParseMaster::exec()
  4. 7.2 advagg_js_compress/jspacker.inc \ParseMaster::exec()
  5. 7 advagg_js_compress/jspacker.inc \ParseMaster::exec()

File

advagg_js_compress/jspacker.inc, line 617

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);
}