Esempio n. 1
0
 /**
  * Performs replacement of specified pattern and replacement strings.
  * @param string $subject Text on which to perform replacement.
  * @return string subject after replacement has been performed.
  */
 public function replace($subject)
 {
     if ($this->pattern === null || $this->replace === null) {
         throw new Exception("Missing pattern or replacement string regexp replace().");
     }
     return $this->engine->replace($this->pattern, $this->replace, $subject);
 }