UTF::emojify PHP Method

emojify() public method

Translate emoji tokens to Unicode font-supported symbols
public emojify ( $str ) : string
$str string
return string
    function emojify($str)
    {
        $map = [':(' => '\\u2639', ':)' => '\\u263a', '<3' => '\\u2665', ':D' => '\\u1f603', 'XD' => '\\u1f606', ';)' => '\\u1f609', ':P' => '\\u1f60b', ':,' => '\\u1f60f', ':/' => '\\u1f623', '8O' => '\\u1f632'] + Base::instance()->get('EMOJI');
        return $this->translate(str_replace(array_keys($map), array_values($map), $str));
    }