Search/Lucene/Document/Html.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Search_Lucene
- Subpackage
- Document
- Version
- $Id$
\Zend_Search_Lucene_Document_Html
- Parent(s)
- \Zend_Search_Lucene_Document
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

boolean $_excludeNoFollowLinks = falsefalseDetails- Type
- boolean

array $_inlineTags = array('a', 'abbr', 'acronym', 'dfn', 'em', 'strong', 'code', 'samp', 'kbd', 'var', 'b', 'i', 'big', 'small', 'strike', 'tt', 'u', 'font', 'span', 'bdo', 'cite', 'del', 'ins', 'q', 'sub', 'sup')array('a', 'abbr', 'acronym', 'dfn', 'em', 'strong', 'code', 'samp', 'kbd', 'var', 'b', 'i', 'big', 'small', 'strike', 'tt', 'u', 'font', 'span', 'bdo', 'cite', 'del', 'ins', 'q', 'sub', 'sup')Details- Type
- array
Methods

__construct(string $data, boolean $isFile, boolean $storeContent, string $defaultEncoding = '') : voidObject constructor
| Name | Type | Description |
|---|---|---|
| $data | string | HTML string (may be HTML fragment, ) |
| $isFile | boolean | |
| $storeContent | boolean | |
| $defaultEncoding | string | HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag. |

_highlightNodeRecursive(\DOMNode $contextNode, array $wordsToHighlight, callback $callback, array $params) : voidhighlight words in content of the specified node
| Name | Type | Description |
|---|---|---|
| $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(\DOMText $node, array $wordsToHighlight, callback $callback, array $params) : voidHighlight text in text node
| Name | Type | Description |
|---|---|---|
| $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) |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

_retrieveNodeText(\DOMNode $node, $text) : voidGet node text
| Name | Type | Description |
|---|---|---|
| $node | \DOMNode | |
| $text |

getExcludeNoFollowLinks() : booleanGet exclude nofollow links flag
| Type | Description |
|---|---|
| boolean |

highlight(string | array $words, string $colour = '#66ffff') : stringHighlight text with specified color
| Name | Type | Description |
|---|---|---|
| $words | string | array | |
| $colour | string |
| Type | Description |
|---|---|
| string |

highlightExtended(string | array $words, callback $callback, array $params = array()) : stringHighlight text using specified View helper or callback function.
| Name | Type | Description |
|---|---|---|
| $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 |
| Type | Description |
|---|---|
| string |
| Exception | Description |
|---|---|
| \Zend_Search_Lucene_Exception |

loadHTML(string $data, boolean $storeContent = false, string $defaultEncoding = '') : \Zend_Search_Lucene_Document_HtmlLoad HTML document from a string
| Name | Type | Description |
|---|---|---|
| $data | string | |
| $storeContent | boolean | |
| $defaultEncoding | string | HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag. |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Document_Html |

loadHTMLFile(string $file, boolean $storeContent = false, string $defaultEncoding = '') : \Zend_Search_Lucene_Document_HtmlLoad HTML document from a file
| Name | Type | Description |
|---|---|---|
| $file | string | |
| $storeContent | boolean | |
| $defaultEncoding | string | HTML encoding, is used if it's not specified using Content-type HTTP-EQUIV meta tag. |
| Type | Description |
|---|---|
| \Zend_Search_Lucene_Document_Html |