_doc = $document; } /** * Get document for highlighting. * * @return Zend_Search_Lucene_Document_Html $document */ public function getDocument() { return $this->_doc; } /** * Highlight specified words * * @param string|array $words Words to highlight. They could be organized using the array or string. */ public function highlight($words) { $color = $this->_highlightColors[$this->_currentColorIndex]; $this->_currentColorIndex = ($this->_currentColorIndex + 1) % count($this->_highlightColors); $this->_doc->highlight($words, $color); } }