iamcal/php-emoji
Composer 安装命令:
composer require iamcal/php-emoji
包简介
This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.
关键字:
README 文档
README
This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.
You can read more about it and see a demo here: http://www.iamcal.com/emoji-in-web-apps/
The data this library is based on comes from another GitHub project: https://github.com/iamcal/emoji-data
USAGE
<?php include('emoji.php'); # when you recieve text from a mobile device, convert it # to the unified format. $data = emoji_docomo_to_unified($data); # DoCoMo devices $data = emoji_kddi_to_unified($data); # KDDI & Au devices $data = emoji_softbank_to_unified($data); # Softbank & pre-iOS6 Apple devices $data = emoji_google_to_unified($data); # Google Android devices # when sending data back to mobile devices, you can # convert back to their native format. $data = emoji_unified_to_docomo($data); # DoCoMo devices $data = emoji_unified_to_kddi($data); # KDDI & Au devices $data = emoji_unified_to_softbank($data); # Softbank & pre-iOS6 Apple devices $data = emoji_unified_to_google($data); # Google Android devices # when displaying data to anyone else, you can use HTML # to format the emoji. $data = emoji_unified_to_html($data); # if you want to use an editor(i.e:wysiwyg) to create the content, # you can use html_to_unified to store the unified value. $data = emoji_html_to_unified(emoji_unified_to_html($data));
When using the HTML format, you'll also need to include the emoji.css file, which points
to the emoji.png image.
IMPORTANT NOTE: This library currently only deals with UTF-8. If your source data is JIS or Shift-JIS, you're out of luck for the moment.
Credits
By Cal Henderson cal@iamcal.com
Images and Emoji data come from emoji-data.
This work is dual-licensed under the GPL v3 and the MIT license.
Version History
- v1.0.0 - 2009-10-20 : First release
- v1.2.0 - 2011-03-27 : ?
- v1.3.0 - 2011-07-27 : ?
- v1.4.0 - 2016-02-15 : Switch to using emoji-data as the backend, at v2.4.0
- v1.4.1 - 2016-10-06 : Added
emoji_contains_emoji(), added travis - v1.4.2 - 2017-03-03 : Support for unified modifiers when converting to/from HTML only (issue #34)
iamcal/php-emoji 适用场景与选型建议
iamcal/php-emoji 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 537.18k 次下载、GitHub Stars 达 1.25k, 最近一次更新时间为 2016 年 09 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「convert」 「converter」 「emoji」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 iamcal/php-emoji 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iamcal/php-emoji 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 iamcal/php-emoji 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provides a simple decimal/roman number converter
A library that provides a simple infrastructure to create your own converters and to perform any conversion you want
Tools to convert between .NET and PHP date formats
A Laravel 5 Package for Using & Working With Emojis
Encode integer IDs using a preset or customized symbol set
A php class that has descriptive names for the emojis and said emojis as its value
统计信息
- 总下载量: 537.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1250
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-12