PHPackages                             abei2017/yii2-emoji - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abei2017/yii2-emoji

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

abei2017/yii2-emoji
===================

一个yii2的emoji扩展

1.1.0(8y ago)161.1k2MITPHP

Since Aug 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/abei2017/yii2-emoji)[ Packagist](https://packagist.org/packages/abei2017/yii2-emoji)[ RSS](/packages/abei2017-yii2-emoji/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

 [ ![](https://camo.githubusercontent.com/971f1ebd764ed6c75344db1379f933ab68617f49b413e680794d9b401e7ff1fe/687474703a2f2f6e6169382e6d652f696d616765732f6578742d6c6f676f732f796969322d656d6f6a692d6c6f676f2e706e67) ](http://nai8.me)

 [![北哥开源扩展](https://camo.githubusercontent.com/aa4cdb6225340d811df2bba31761514120be34e4dcac3acb4a4d12d35b21ed40/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f61626569323031372f796969322d656d6f6a692e737667)](https://github.com/abei2017/yii2-emoji/issues) [![北哥开源扩展](https://camo.githubusercontent.com/a7825079102f928916285f97f773c1651d44a180a2f7068c305e97e39ced05c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f61626569323031372f796969322d656d6f6a692e737667)](https://github.com/abei2017/yii2-emoji) [![北哥开源扩展](https://camo.githubusercontent.com/7fb9f64a8ec884bb55e75accecc58d8b64034770d6836ece06e7ed6e54fddac5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f61626569323031372f796969322d656d6f6a692e737667)](https://github.com/abei2017/yii2-emoji)

 这是一套供yii2框架使用的emoji表情库。

 [ ![](https://camo.githubusercontent.com/aecfa6c95afb65f4b7971cf7bcfdebf02a9a97d6ab08cbbd1a0f3474f120b561/68747470733a2f2f6e6169382e6d652f696d616765732f6578742d6c6f676f732f7863782e706e67) ](http://nai8.me)

Install
=======

[](#install)

$ composer require abei2017/yii2-emoji

> only used in yii2.

[Video](http://nai8.me/course-video.html?id=151)

Usage
=====

[](#usage)

```
use abei2017\emoji\Emoji;
Emoji::shortnameToImage('hello:smile:');// hello
Emoji::toShort('😄'); // :smile:
Emoji::unicodeToImage('😄'); //
Emoji::toImage(':smile:'); //
Emoji::shortnameToUnicode(':smile:'); // 😄
```

Config
======

[](#config)

```
// config/web.php
return [
    ...
    'yii2Emoji'=>[
        'emojiSize'=>'32',//32、64、128
    ]
];
```

Use Behavior (&gt;= v1.1.0)
===========================

[](#use-behavior--v110)

```
// in ActiveRecord
use abei2017\emoji\ValBehavior;
public function behaviors(){
     return [
         'hello'=>[
             'class'=>'abei2017\emoji\ValBehavior',
             'valAttribute'=>'content',// no set, default "content"
             'inFunc'=>'toShort'// no set, default "toShort", and you can set "shortnameToUnicode"
         ]
     ];
 }
```

License
=======

[](#license)

MIT

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

2

Last Release

3228d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25122181?v=4)[阿北](/maintainers/abei2017)[@abei2017](https://github.com/abei2017)

---

Top Contributors

[![abei2017](https://avatars.githubusercontent.com/u/25122181?v=4)](https://github.com/abei2017 "abei2017 (10 commits)")

---

Tags

emojiemojioneyii2yii2-extensionyii2extension

### Embed Badge

![Health badge](/badges/abei2017-yii2-emoji/health.svg)

```
[![Health](https://phpackages.com/badges/abei2017-yii2-emoji/health.svg)](https://phpackages.com/packages/abei2017-yii2-emoji)
```

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7760.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1454.6k](/packages/dmstr-yii2-cookie-consent)[imanilchaudhari/yii2-currency-converter

This extension will help to find out current currency conversion rate.

1911.7k](/packages/imanilchaudhari-yii2-currency-converter)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1358.5k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
