public function highlight($words, $colour = '#66ffff') { return $this->highlightExtended($words, [$this, 'applyColour'], [$colour]); }
/** * 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); }