Documentation

Horde_Text_Filter_Emails extends Horde_Text_Filter_Base
in package

The Horde_Text_Filter_Emails:: class finds email addresses in a block of text and turns them into links.

Parameters:

class - (string) CSS class of the generated  tag.
        DEFAULT: ''
encode - (boolean) Whether to escape special HTML characters in the URLs
         and finally "encode" the complete tag so that it can be decoded
         later with the decode() method. This is useful if you want to run
         htmlspecialchars() or similar *after* using this filter.
         DEFAULT: false

Copyright 2003-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
author

Tyler Colbert tyler@colberts.us

author

Jan Schneider jan@horde.org

category

Horde

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$_params  : array<string|int, mixed>
Filter parameters.
__construct()  : mixed
Constructor.
decode()  : string
"Decodes" the text formerly encoded by using the "encode" parameter.
getPatterns()  : array<string|int, mixed>
Returns a hash with replace patterns.
postProcess()  : string
Executes any code necessaray after applying the filter patterns.
preProcess()  : string
Executes any code necessaray before applying the filter patterns.
regexCallback()  : string
Regular expression callback.
_regexCallback()  : string
Regular expression callback.

Properties

$_params

Filter parameters.

protected array<string|int, mixed> $_params = array('class' => '', 'encode' => \false, 'secret' => \null)

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

Any parameters that the filter instance needs.

Return values
mixed

decode()

"Decodes" the text formerly encoded by using the "encode" parameter.

public static decode(string $text[, string $key = null ]) : string
Parameters
$text : string

An encoded text.

$key : string = null

An optional key to use with Horde_Secret encryption. If omitted a key will be fetched from a Horde_Secret instance.

Return values
string

The decoded text.

getPatterns()

Returns a hash with replace patterns.

public getPatterns() : array<string|int, mixed>
Return values
array<string|int, mixed>

Patterns hash.

postProcess()

Executes any code necessaray after applying the filter patterns.

public postProcess(string $text) : string
Parameters
$text : string

The text after the filtering.

Return values
string

The modified text.

preProcess()

Executes any code necessaray before applying the filter patterns.

public preProcess(string $text) : string
Parameters
$text : string

The text before the filtering.

Return values
string

The modified text.

regexCallback()

Regular expression callback.

public regexCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>

preg_replace_callback() matches. See regex above for description of matching data.

Return values
string

Replacement string.

_regexCallback()

Regular expression callback.

protected _regexCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>

preg_replace_callback() matches. See regex above for description of matching data.

Return values
string

Replacement string.

Search results