Properties

$ascii

$ascii : 

Type

$unicodeAlt

$unicodeAlt : 

Type

$imageType

$imageType : 

Type

$cacheBustParam

$cacheBustParam : 

Type

$sprites

$sprites : 

Type

$imagePathPNG

$imagePathPNG : 

Type

$imagePathSVG

$imagePathSVG : 

Type

$imagePathSVGSprites

$imagePathSVGSprites : 

Type

$unicode_replaceWith

$unicode_replaceWith : 

Type

$ignoredRegexp

$ignoredRegexp : 

Type

$unicodeRegexp

$unicodeRegexp : 

Type

$shortcodeRegexp

$shortcodeRegexp : 

Type

$ruleset

$ruleset : 

Type

Methods

toImage()

toImage(string  $string) : string

First pass changes unicode characters into emoji markup.

Second pass changes any shortnames into emoji markup.

Parameters

string $string

The input string.

Returns

string —

String with appropriate html for rendering emoji.

unifyUnicode()

unifyUnicode(string  $string) : string

Uses toShort to transform all unicode into a standard shortname then transforms the shortname into unicode.

This is done for standardization when converting several unicode types.

Parameters

string $string

The input string.

Returns

string —

String with standardized unicode.

shortnameToUnicode()

shortnameToUnicode(string  $string) : string

This will output unicode from shortname input.

If Client/$ascii is true it will also output unicode from ascii. This is useful for sending emojis back to mobile devices.

Parameters

string $string

The input string.

Returns

string —

String with unicode replacements.

shortnameToAscii()

shortnameToAscii(string  $string) : string

This will replace shortnames with their ascii equivalent.

ex. :wink: --> ;^) This is useful for systems that don't support unicode or images.

Parameters

string $string

The input string.

Returns

string —

String with ascii replacements.

shortnameToImage()

shortnameToImage(string  $string) : string

This will output image markup (for png or svg) from shortname input.

Parameters

string $string

The input string.

Returns

string —

String with appropriate html for rendering emoji.

toShort()

toShort(string  $string) : string

This will return the shortname from unicode input.

Parameters

string $string

The input string.

Returns

string —

shortname

unicodeToImage()

unicodeToImage(string  $string) : string

This will output image markup (for png or svg) from unicode input.

Parameters

string $string

The input string.

Returns

string —

String with appropriate html for rendering emoji.

shortnameToAsciiCallback()

shortnameToAsciiCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

Ascii replacement result.

shortnameToUnicodeCallback()

shortnameToUnicodeCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

Unicode replacement result.

shortnameToImageCallback()

shortnameToImageCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

Image HTML replacement result.

asciiToUnicodeCallback()

asciiToUnicodeCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

Unicode replacement result.

asciiToImageCallback()

asciiToImageCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

Image HTML replacement result.

toShortCallback()

toShortCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

shortname result

unicodeToImageCallback()

unicodeToImageCallback(array  $m) : string

Parameters

array $m

Results of preg_replace_callback().

Returns

string —

Image HTML replacement result.

convert()

convert(string  $unicode) : string

Converts from unicode to hexadecimal NCR.

Parameters

string $unicode

unicode character/s

Returns

string —

hexadecimal NCR