questocat/epic-emoji

The emoji epic conversion library

v1.0.0 2018-04-14 07:38 UTC

This package is auto-updated.

Last update: 2024-11-20 15:44:14 UTC


README

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.