2017 © Pedro Peláez
 

library emoji

filtes emoji symbols for you

image

hidehalo/emoji

filtes emoji symbols for you

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 75 % Grown

The README.md

Emoji

Build Status FOSSA Status, (*1)

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

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, (*3)



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., (*4)

FOSSA Status, (*5)

The Versions

16/03 2018

dev-master

9999999-dev

filtes emoji symbols for you

  Sources   Download

MIT

The Requires

 

The Development Requires

16/03 2018

1.0.1

1.0.1.0

filtes emoji symbols for you

  Sources   Download

MIT

The Development Requires

11/03 2018

v1.0.x-dev

1.0.9999999.9999999-dev

filtes emoji symbols for you

  Sources   Download

MIT

The Development Requires

11/03 2018

1.0

1.0.0.0

filtes emoji symbols for you

  Sources   Download

MIT

The Development Requires

11/12 2017

0.1.4

0.1.4.0

filtes emoji symbols for you

  Sources   Download

MIT

The Requires

 

The Development Requires

13/05 2017

0.1.3

0.1.3.0

filtes emoji symbols for you

  Sources   Download

MIT

The Development Requires

13/05 2017

v0.1.2

0.1.2.0

filtes emoji symbols for you

  Sources   Download

MIT

The Development Requires

30/03 2017

0.1.1

0.1.1.0

filtes emoji symbols for you

  Sources   Download

MIT

The Development Requires

30/09 2016

0.1

0.1.0.0

detected emoji and stored for web

  Sources   Download

MIT