\Horde_Text_Filter_Emoticons

The Horde_Text_Filter_Emoticons:: class finds emoticon strings in a block of text and does a transformation on them.

By default, this filter does not do any transformation to the emoticon.

Parameters:

entities - (boolean) Use HTML entity versions of the patterns?
           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.

Summary

Methods
Properties
Constants
__construct()
preProcess()
getPatterns()
postProcess()
emoticonReplace()
getIcon()
getIcons()
No public properties found
No constants found
No protected methods found
$_params
$_emoticons
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Filter parameters.

Type

array

$_emoticons

$_emoticons : 

Type

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Any parameters that the filter instance needs.

preProcess()

preProcess(string  $text) : string

Executes any code necessaray before applying the filter patterns.

Parameters

string $text

The text before the filtering.

Returns

string —

The modified text.

getPatterns()

getPatterns() : array

Returns a hash with replace patterns.

Returns

array —

Patterns hash.

postProcess()

postProcess(string  $text) : string

Executes any code necessaray after applying the filter patterns.

Parameters

string $text

The text after the filtering.

Returns

string —

The modified text.

emoticonReplace()

emoticonReplace(array  $matches) : string

Returns the replacement emoticon text.

Parameters

array $matches

Matches from preg_replace_callback().

Returns

string —

The replacement text.

getIcon()

getIcon(string  $icon) : string

Return the replacement emoticon text.

Parameters

string $icon

The emoticon name.

Returns

string —

The replacement text.

getIcons()

getIcons(string  $icon = null) : array|string

Returns a hash with all emoticons and names or the name of a single emoticon.

Parameters

string $icon

If set, return the name for that emoticon only.

Returns

array|string —

Patterns hash or emoticon name.