PHP Class Horde_Mime_Viewer_Html, horde

Author: Anil Madhavapeddy ([email protected])
Author: Jon Parise ([email protected])
Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Mime_Viewer_Base
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_capability array This driver's display capabilities.
$_phishCss string The CSS used to display the phishing warning.
$_phishWarn boolean Phishing status of last call to _phishingCheck().
$_tmp array Temp array for storing data when parsing the HTML document.

Public Methods

Method Description
__construct ( Horde_Mime_Part $part, array $conf = [] ) Constructor.

Protected Methods

Method Description
_cleanHTML ( string $data, array $options = [] ) : Horde_Domhtml Filters active content, dereferences external links, detects phishing, etc.
_node ( DOMDocument $doc, DOMNode $node ) Process DOM node.
_phishingCheck ( string $href, string $text ) : boolean Check for phishing exploits.
_render ( ) : array Return the full rendered version of the Horde_Mime_Part object.
_renderInline ( ) : array Return the rendered inline version of the Horde_Mime_Part object.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Mime_Part $part, array $conf = [] )
$part Horde_Mime_Part
$conf array Configuration: - browser: (Horde_Browser) A browser object. - dns: (Net_DNS2_Resolver) A DNS resolver object; used in phishing analysis (@since 2.1.0). - external_callback: (callback) A callback function that a href URL is passed through. The function must take the original URL as the first parameter. DEFAULT: No callback

_cleanHTML() protected method

Filters active content, dereferences external links, detects phishing, etc.
protected _cleanHTML ( string $data, array $options = [] ) : Horde_Domhtml
$data string The HTML data.
$options array Additional options: - charset: (string) The charset of $data. DEFAULT: The base part charset. - inline: (boolean) Are we viewing inline? DEFAULT: false - noprefetch: (boolean) Disable DNS prefetching? DEFAULT: false - phishing: (boolean) Do phishing highlighting even if not viewing inline. DEFAULT: false.
return Horde_Domhtml The cleaned HTML data.

_node() protected method

Process DOM node.
protected _node ( DOMDocument $doc, DOMNode $node )
$doc DOMDocument Document node.
$node DOMNode Node.

_phishingCheck() protected method

Check for phishing exploits.
protected _phishingCheck ( string $href, string $text ) : boolean
$href string The HREF value.
$text string The text value of the link.
return boolean True if phishing is detected.

_render() protected method

Return the full rendered version of the Horde_Mime_Part object.
protected _render ( ) : array
return array See parent::render().

_renderInline() protected method

Return the rendered inline version of the Horde_Mime_Part object.
protected _renderInline ( ) : array
return array See parent::render().

Property Details

$_capability protected property

This driver's display capabilities.
protected array $_capability
return array

$_phishCss protected property

The CSS used to display the phishing warning.
protected string $_phishCss
return string

$_phishWarn protected property

Phishing status of last call to _phishingCheck().
protected bool $_phishWarn
return boolean

$_tmp protected property

Temp array for storing data when parsing the HTML document.
protected array $_tmp
return array