term = preg_quote($term); } function testText($text) { return preg_match("/$this->term/", $text); } function visitFormosite(Formosite $comp, $level) { if ($this->testText($comp->getId())) { $this->matches[] = $comp; } } function visitPage(Page $comp, $level) { if ($this->testText($comp->getId())) { $this->matches[] = $comp; } } function visitBlock(Block $comp, $level) { if ($this->testText($comp->getId())) { $this->matches[] = $comp; } } function visitField(Field $comp, $level) { if ($this->testText($comp->getId())) { $this->matches[] = $comp; } } function matches() { return $this->matches; } } ?>