marufmax/emoticon-php

PHP 的优雅表情符号/表情包

1.1.0 2023-12-12 12:00 UTC

This package is auto-updated.

Last update: 2024-09-12 13:58:38 UTC


README

Latest Version on Packagist Software License Quality Score Code Coverage StyleCI

表情符号的 Composer 包 🎉

安装

在安装此包之前,您需要 PHPComposer

只需在您的项目目录中运行 composer require marufmax/emoticon-php

用法示例

    $emoji = new \MarufMax\Emoticon\Emoticon();
    
    $emoji->random();  // will display an random emoji ==> 🍕️ 
    $emoji->get('heart'); // it will return an emoji with heart ❤, note: this also support with colon 
    $emoji->get(':heart:');
    $emoji->search('hea'); // This will return an array with all emojies and key name matching with word `hea`
    $emoji->emojify('I like :metal: ');  // It will render the text with metal emoji

测试

$composer test

安全

如果您发现任何安全相关的问题,请通过 hi@marufalom.com 发送电子邮件,而不是使用问题跟踪器。