PHP Class Horde_Text_Filter_Emoticons, horde

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-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Marko Djukic ([email protected])
Inheritance: extends Horde_Text_Filter_Base
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_emoticons * List complex strings before simpler ones, otherwise for example :(( would be matched against :( before :(( is found.
$_params array Filter parameters.

Public Methods

Method Description
emoticonReplace ( array $matches ) : string Returns the replacement emoticon text.
getIcon ( string $icon ) : string Return the replacement emoticon text.
getIcons ( string $icon = null ) : array | string Returns a hash with all emoticons and names or the name of a single emoticon.
getPatterns ( ) : array Returns a hash with replace patterns.

Method Details

emoticonReplace() public method

Returns the replacement emoticon text.
public emoticonReplace ( array $matches ) : string
$matches array Matches from preg_replace_callback().
return string The replacement text.

getIcon() public method

Return the replacement emoticon text.
public getIcon ( string $icon ) : string
$icon string The emoticon name.
return string The replacement text.

getIcons() public method

Returns a hash with all emoticons and names or the name of a single emoticon.
public getIcons ( string $icon = null ) : array | string
$icon string If set, return the name for that emoticon only.
return array | string Patterns hash or emoticon name.

getPatterns() public method

Returns a hash with replace patterns.
public getPatterns ( ) : array
return array Patterns hash.

Property Details

$_emoticons protected_oe property

* List complex strings before simpler ones, otherwise for example :(( would be matched against :( before :(( is found.
protected $_emoticons

$_params protected_oe property

Filter parameters.
protected array $_params
return array