Свойство | Type | Description | |
---|---|---|---|
$body | |||
$title | string |
Méthode | Description | |
---|---|---|
__construct ( |
Constructor. | |
getExcerpt ( integer $length = 200, boolean $includeTitle = false, array | string | null $focus = null ) : string | null | Get the excerpt of a given piece of text. |
Méthode | Description | |
---|---|---|
determineSnipLocation ( array $locations, integer $prevCount ) : integer | Work out which is the most relevant portion to display This is done by looping over each match and finding the smallest distance between two found strings. The idea being that the closer the terms are the better match the snippet would be. | |
extractLocations ( array $words, string $fulltext ) : array | Find the locations of each of the words. | |
extractRelevant ( string | array $words, string $fulltext, integer $relLength = 300 ) : mixed | string | Center on, and highlight search terms in excerpts. |