elvanto/litemoji
Composer 安装命令:
composer require elvanto/litemoji
包简介
A PHP library simplifying the conversion of unicode, HTML and shortcode emoji.
关键字:
README 文档
README
A PHP library simplifying the conversion of unicode, HTML and shortcode emoji.
Installation
$ composer require elvanto/litemoji
Alternatively you can clone or download the library files.
Usage
use LitEmoji\LitEmoji; echo LitEmoji::encodeShortcode('Baby you light my 🔥! 😃'); // 'Baby you light my :fire:! :smiley:' echo LitEmoji::encodeHtml('Baby you light my :fire:! :smiley:'); // 'Baby you light my 🔥! 😃' echo LitEmoji::encodeUnicode('Baby you light my :fire:! :smiley:'); // 'Baby you light my 🔥! 😃' echo LitEmoji::removeEmoji('Baby you light my 🔥! 😃!!!'); // 'Baby you light my ! !!!'
Configuration
use LitEmoji\LitEmoji; // Exclude specific shortcodes when converting from unicode and HTML entities LitEmoji::config('excludeShortcodes', ['mobile', 'android']); echo LitEmoji::encodeShortcode('📱'); // ':iphone:' // Add aliases for custom shortcodes LitEmoji::config('aliasShortcodes', ['yeah' => 'thumbsup']); echo LitEmoji::encodeUnicode('Can do :yeah:!'); // 'Can do 👍!'
Encodings
LitEmoji's various functions will do their best to detect the encoding of the provided text and should work on UTF-8 encoded strings without issue. In cases where the encoding cannot be detected, UTF-8 is assumed, however a second argument can be provided to any of the functions to hint the actual encoded of the provided string.
Contributing
Pull requests are welcome. New code must be fully unit tested (the existing test suite can be run with PHPUnit).
License
elvanto/litemoji 适用场景与选型建议
elvanto/litemoji 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.81M 次下载、GitHub Stars 达 82, 最近一次更新时间为 2017 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「emoji」 「php-emoji」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 elvanto/litemoji 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 elvanto/litemoji 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 elvanto/litemoji 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
An Elegant Emoji/Emoticon package for PHP
A Laravel 5 Package for Using & Working With Emojis
A php class that has descriptive names for the emojis and said emojis as its value
PHP Unicode library
Country Flag Emoji for PHP
A Symfony2 bundle for the jadu/emoji component
统计信息
- 总下载量: 4.81M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 87
- 点击次数: 20
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-13