定制 hidehalo/emoji 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hidehalo/emoji

最新稳定版本:1.0.1

Composer 安装命令:

composer require hidehalo/emoji

包简介

filtes emoji symbols for you

README 文档

README

Build Status FOSSA Status

If you want help with parse and store emoji symbol characters,you could think about use this library :)

Features

  1. Detected emoji symbols only
  2. Replace emoji symbols to other texts and turn it back
  3. Zero dependence
  4. Lightweight and fast

Install

$composer require hidehalo/emoji

Usage

Parser

require vendor/autoload.php; use Hidehalo\Emoji\Parser; $parser = new Parser(); $parser->parse($contents);

Converter

# if you want to replace those emoji symbols to ohter marked texts  # and has ability to turn those back, # it has a built-in Protocol and Converter could do this # and $decoded will equals $raw,it is real very simple use Hidehalo\Emoji\Converter; $converter = new Converter($parser); $encoded = $converter->encode($raw); $decoded = $converter->decode($encoded); # filter emojis use Hidehalo\Emoji\Protocol\Filter; $clean = $converter->encode($raw, new Filter);

Custom protocol

Maybe you want to impl your custom convert protocol,you can make it through implements ProtocolInterface

use Hidehalo\Emoji\Protocol\ProtocolInterface as Protocol; use Hidehalo\Emoji\Protocol\PatternAwareTrait; class CustomProto implments Protocol { use PatternAwareTrait; protected $format = "FORMAT"; protected $pattern = "/FORMAT/"; public function encode($contents) { //your impls } public function decode($contents) { //your impls } } $customProto = new CustomProto; $customEncoded = $converter->encode($raw, $customProto); $customDecoded = $converter->decode($customDecoded, $customProto);

Testing

$./vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.

FOSSA Status

统计信息

  • 总下载量: 151.31k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固