Skip to content

questocat/epic-emoji

Repository files navigation

epic-emoji

The emoji epic conversion library

StyleCI Build Status Code Coverage Scrutinizer Code Quality Build Status Packagist

Installation

Using Composer to add the package to your project's dependencies:

$ composer require questocat/epic-emoji

Usage

$epicEmoji = new EpicEmoji();

// from Apple devices
$content = '呜呜,宝宝不开心😔';
$unified = $epicEmoji->unified($content);

$unified->emoji();        // output emoji
$unified->setText('哇哦👻')->emoji();   // output emoji
$unified->withText('哇哦👻')->emoji();  // output emoji
$unified->shorthand();    // output shorthand
$unified->codepoint();    // output codepoint
$unified->html();         // output html
$unified->htmlEntity();   // output htmlEntity

// convert to DoCoMo devices
$docomo = $unified->docomo();

// convert to Softbank & pre-iOS6 Apple devices
$softbank = $unified->softbank();

// convert to KDDI & Au devices
$kddi = $unified->kddi();

// convert to Google Android devices
$google = $unified->google();
$google->emoji();         // output emoji
$google->shorthand();     // output shorthand
$google->codepoint();     // output codepoint
$google->html();          // output html
$google->htmlEntity();    // output htmlEntity

Inspiration

Reference

License

Licensed under the MIT license.