PHP Class TeamTNT\TNTSearch\Support\Highlighter

Show file Open project: teamtnt/tntsearch Class Usage Examples

Protected Properties

Property Type Description
$options

Public Methods

Method Description
_determineSnipLocation ( $locations, $prevcount ) first as will be equally distant.
_extractLocations ( $words, $fulltext ) unless you decide to make the words unique before passing in
extractRelevant ( $words, $fulltext, $rellength = 300, $prevcount = 50, $indicator = '...' ) in the middle of the extract
highlight ( $text, $needle, $tag = 'em', $options = [] )

Method Details

_determineSnipLocation() public method

first as will be equally distant.
public _determineSnipLocation ( $locations, $prevcount )

_extractLocations() public method

unless you decide to make the words unique before passing in
public _extractLocations ( $words, $fulltext )

extractRelevant() public method

in the middle of the extract
public extractRelevant ( $words, $fulltext, $rellength = 300, $prevcount = 50, $indicator = '...' )

highlight() public method

public highlight ( $text, $needle, $tag = 'em', $options = [] )

Property Details

$options protected property

protected $options