HumHub Documentation (unofficial)

DefaultHighlighter
in package
implements HighlighterInterface

Tags
category

Zend

subpackage

Search

Table of Contents

Interfaces

HighlighterInterface

Properties

$_currentColorIndex  : int
Index of current color for highlighting
$_doc  : HTML
HTML document for highlighting
$_highlightColors  : array<string|int, mixed>
List of colors for text highlighting

Methods

getDocument()  : HTML
Get document for highlighting.
highlight()  : void
Highlight specified words
setDocument()  : void
Set document for highlighting.

Properties

$_currentColorIndex

Index of current color for highlighting

protected int $_currentColorIndex = 0

Index is increased at each highlight() call, so terms matching different queries are highlighted using different colors.

$_highlightColors

List of colors for text highlighting

protected array<string|int, mixed> $_highlightColors = array('#66ffff', '#ff66ff', '#ffff66', '#ff8888', '#88ff88', '#8888ff', '#88dddd', '#dd88dd', '#dddd88', '#aaddff', '#aaffdd', '#ddaaff', '#ddffaa', '#ffaadd', '#ffddaa')

Methods

highlight()

Highlight specified words

public highlight(string|array<string|int, mixed> $words) : void
Parameters
$words : string|array<string|int, mixed>

Words to highlight. They could be organized using the array or string.


        
On this page

Search results