项目作者: questocat

项目描述 :
The emoji epic conversion library
高级语言: PHP
项目地址: git://github.com/questocat/epic-emoji.git
创建时间: 2017-06-28T14:37:05Z
项目社区:https://github.com/questocat/epic-emoji

开源协议:MIT License

下载


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:

  1. $ composer require questocat/epic-emoji

Usage

  1. $epicEmoji = new EpicEmoji();
  2. // from Apple devices
  3. $content = '呜呜,宝宝不开心😔';
  4. $unified = $epicEmoji->unified($content);
  5. $unified->emoji(); // output emoji
  6. $unified->setText('哇哦👻')->emoji(); // output emoji
  7. $unified->withText('哇哦👻')->emoji(); // output emoji
  8. $unified->shorthand(); // output shorthand
  9. $unified->codepoint(); // output codepoint
  10. $unified->html(); // output html
  11. $unified->htmlEntity(); // output htmlEntity
  12. // convert to DoCoMo devices
  13. $docomo = $unified->docomo();
  14. // convert to Softbank & pre-iOS6 Apple devices
  15. $softbank = $unified->softbank();
  16. // convert to KDDI & Au devices
  17. $kddi = $unified->kddi();
  18. // convert to Google Android devices
  19. $google = $unified->google();
  20. $google->emoji(); // output emoji
  21. $google->shorthand(); // output shorthand
  22. $google->codepoint(); // output codepoint
  23. $google->html(); // output html
  24. $google->htmlEntity(); // output htmlEntity

Inspiration

Reference

License

Licensed under the MIT license.