Property | Type | Description | |
---|---|---|---|
$emojiMap | array | The array mapping words to emoji. | |
$emojiMapFile | string | The path to the file containing the emoji map. | |
$wordMap | array | The array mapping emoji back to words. |
Method | Description | |
---|---|---|
getInstance ( ) : |
Returns the *Singleton* instance of this class. | |
setEmojiMapFile ( string $emojiMapFile ) : |
Set File Path to Emoji Map File. | |
text ( $text ) : mixed | Alias of toEmoji() | |
toEmoji ( $text ) : mixed | Translate Word to Emoji | |
toWord ( $text ) : mixed | Translate Emoji to Word | |
translate ( $text ) : mixed | Alias of toWord() |
Method | Description | |
---|---|---|
__construct ( ) | Protected Emojify constructor to prevent creating a new instance of the *Singleton* via the new operator from outside of this class. | |
emojiToWordReplace ( $line, $replace, $delimiter ) : mixed | Finds emojis and replaces them with text enclosed by the delimiter | |
getEmojiMap ( ) : array | Get Emoji Map Array. | |
replace ( $line, $replace, boolean $toWord = false, string $delimiter = ':' ) : mixed | Replace | |
setupEmojiMaps ( ) | Setup Emoji Maps. | |
wordToEmojiReplace ( $line, $replace, $delimiter ) : mixed | Finds words enclosed by the delimiter and converts them to the appropriate emoji character. |
Method | Description | |
---|---|---|
__clone ( ) : void | Private clone method to prevent cloning of the instance of the *Singleton* instance. | |
__wakeup ( ) : void | Private unserialize method to prevent unserializing of the *Singleton* instance. |
protected __construct ( ) |
protected emojiToWordReplace ( $line, $replace, $delimiter ) : mixed | ||
$line | ||
$replace | ||
$delimiter | ||
return | mixed |
public static getInstance ( ) : |
||
return | The *Singleton* instance. |
public setEmojiMapFile ( string $emojiMapFile ) : |
||
$emojiMapFile | string | |
return |
protected wordToEmojiReplace ( $line, $replace, $delimiter ) : mixed | ||
$line | ||
$replace | ||
$delimiter | ||
return | mixed |
protected array $emojiMap | ||
return | array |
protected string $emojiMapFile | ||
return | string |
protected array $wordMap | ||
return | array |