2017 © Pedro Peláez
 

yii2-extension yii2-emoji

一个yii2的emoji扩展

image

abei2017/yii2-emoji

一个yii2的emoji扩展

  • Saturday, November 4, 2017
  • by abei2017
  • Repository
  • 1 Watchers
  • 11 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

, (*1)

北哥开源扩展 北哥开源扩展 北哥开源扩展 , (*2)

  这是一套供yii2框架使用的emoji表情库。 , (*3)

, (*4)

, (*5)

Install

$ composer require abei2017/yii2-emoji, (*6)

only used in yii2., (*7)

Video, (*8)

Usage

use abei2017\emoji\Emoji;
Emoji::shortnameToImage('hello:smile:');// hello <img class="emojione" alt="😄" title=":smile:" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/32/1f604.png">
Emoji::toShort('😄'); // :smile:
Emoji::unicodeToImage('😄'); // <img class="emojione" alt="😄" title=":smile:" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/32/1f604.png">
Emoji::toImage(':smile:'); // <img class="emojione" alt="😄" title=":smile:" src="https://cdn.jsdelivr.net/emojione/assets/3.1/png/32/1f604.png">
Emoji::shortnameToUnicode(':smile:'); // 😄

Config

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

Use Behavior (>= v1.1.0)

// 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

MIT, (*9)

The Versions

04/11 2017

dev-master

9999999-dev

一个yii2的emoji扩展

  Sources   Download

MIT

The Requires

 

by abei

extension yii2

28/08 2017

1.1.0

1.1.0.0

一个yii2的emoji扩展

  Sources   Download

MIT

The Requires

 

by abei

extension yii2

16/08 2017

1.0.0

1.0.0.0

一个yii2的emoji扩展

  Sources   Download

MIT

The Requires

 

by abei

extension yii2