PHP Класс Zend_Search_Lucene_Document_Html

Наследование: extends Zend_Search_Lucene_Document
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
applyColour ( string $stringToHighlight, $colour ) : string Standard callback method used to highlight words.
getExcludeNoFollowLinks ( ) : boolean Get exclude nofollow links flag
getHTML ( ) : string Get HTML
getHeaderLinks ( ) : array Get document header links
getHtmlBody ( ) : string Get HTML body
getLinks ( ) : array Get document HREF links
highlight ( string | array $words, string $colour = '#66ffff' ) : string Highlight text with specified color
highlightExtended ( string | array $words, callback $callback, array $params = [] ) : string Highlight text using specified View helper or callback function.
loadHTML ( string $data, boolean $storeContent = false, string $defaultEncoding = '' ) : Zend_Search_Lucene_Document_Html Load HTML document from a string
loadHTMLFile ( string $file, boolean $storeContent = false, string $defaultEncoding = '' ) : Zend_Search_Lucene_Document_Html Load HTML document from a file
setExcludeNoFollowLinks ( boolean $newValue ) Set exclude nofollow links flag

Защищенные методы

Метод Описание
_highlightNodeRecursive ( DOMNode $contextNode, array $wordsToHighlight, callback $callback, array $params ) highlight words in content of the specified node
_highlightTextNode ( DOMText $node, array $wordsToHighlight, callback $callback, array $params ) Highlight text in text node

Приватные методы

Метод Описание
__construct ( string $data, boolean $isFile, boolean $storeContent, string $defaultEncoding = '' ) Object constructor
_retrieveNodeText ( DOMNode $node, &$text ) Get node text

Описание методов

_highlightNodeRecursive() защищенный Метод

highlight words in content of the specified node
protected _highlightNodeRecursive ( DOMNode $contextNode, array $wordsToHighlight, callback $callback, array $params )
$contextNode DOMNode
$wordsToHighlight array
$callback callback Callback method, used to transform (highlighting) text.
$params array Array of additionall callback parameters (first non-optional parameter is a text to transform)

_highlightTextNode() защищенный Метод

Highlight text in text node
protected _highlightTextNode ( DOMText $node, array $wordsToHighlight, callback $callback, array $params )
$node DOMText
$wordsToHighlight array
$callback callback Callback method, used to transform (highlighting) text.
$params array Array of additionall callback parameters (first non-optional parameter is a text to transform)

applyColour() публичный Метод

Standard callback method used to highlight words.
public applyColour ( string $stringToHighlight, $colour ) : string
$stringToHighlight string
Результат string

getHTML() публичный Метод

Get HTML
public getHTML ( ) : string
Результат string

getHtmlBody() публичный Метод

Get HTML body
public getHtmlBody ( ) : string
Результат string

highlight() публичный Метод

Highlight text with specified color
public highlight ( string | array $words, string $colour = '#66ffff' ) : string
$words string | array
$colour string
Результат string

highlightExtended() публичный Метод

Highlight text using specified View helper or callback function.
public highlightExtended ( string | array $words, callback $callback, array $params = [] ) : string
$words string | array Words to highlight. Words could be organized using the array or string.
$callback callback Callback method, used to transform (highlighting) text.
$params array Array of additionall callback parameters passed through into it (first non-optional parameter is an HTML fragment for highlighting)
Результат string

loadHTML() публичный статический Метод

Load HTML document from a string
public static loadHTML ( string $data, boolean $storeContent = false, string $defaultEncoding = '' ) : Zend_Search_Lucene_Document_Html
$data string
$storeContent boolean
$defaultEncoding string HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag.
Результат Zend_Search_Lucene_Document_Html

loadHTMLFile() публичный статический Метод

Load HTML document from a file
public static loadHTMLFile ( string $file, boolean $storeContent = false, string $defaultEncoding = '' ) : Zend_Search_Lucene_Document_Html
$file string
$storeContent boolean
$defaultEncoding string HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag.
Результат Zend_Search_Lucene_Document_Html