Méthode | Description | |
---|---|---|
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 |
Méthode | Description | |
---|---|---|
_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 |
Méthode | Description | |
---|---|---|
__construct ( string $data, boolean $isFile, boolean $storeContent, string $defaultEncoding = '' ) | Object constructor | |
_retrieveNodeText ( DOMNode $node, &$text ) | Get node text |
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) |
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) |
public applyColour ( string $stringToHighlight, $colour ) : string | ||
$stringToHighlight | string | |
Résultat | string |
public static getExcludeNoFollowLinks ( ) : boolean | ||
Résultat | boolean |
public getHeaderLinks ( ) : array | ||
Résultat | array |
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) |
Résultat | 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. |
Résultat | Zend_Search_Lucene_Document_Html |
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. |
Résultat | Zend_Search_Lucene_Document_Html |
public static setExcludeNoFollowLinks ( boolean $newValue ) | ||
$newValue | boolean |