{"id":16446378,"url":"https://github.com/hidehalo/emoji","last_synced_at":"2025-03-16T17:36:50.209Z","repository":{"id":50946085,"uuid":"66575455","full_name":"hidehalo/emoji","owner":"hidehalo","description":"make parse and convert all of emoji symbols more simple than ever","archived":false,"fork":false,"pushed_at":"2021-05-27T03:41:18.000Z","size":164,"stargazers_count":31,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-27T12:05:15.906Z","etag":null,"topics":["composer-package","emoji","emoji-filter","emoji-parser","emoji-symbols","fast","lightweight","php","zero-dependency"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hidehalo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-25T16:35:10.000Z","updated_at":"2024-02-01T01:41:45.000Z","dependencies_parsed_at":"2022-08-26T13:41:04.358Z","dependency_job_id":null,"html_url":"https://github.com/hidehalo/emoji","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidehalo%2Femoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidehalo%2Femoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidehalo%2Femoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidehalo%2Femoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hidehalo","download_url":"https://codeload.github.com/hidehalo/emoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243823702,"owners_count":20353717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer-package","emoji","emoji-filter","emoji-parser","emoji-symbols","fast","lightweight","php","zero-dependency"],"created_at":"2024-10-11T09:47:24.084Z","updated_at":"2025-03-16T17:36:49.898Z","avatar_url":"https://github.com/hidehalo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emoji\n\n[![Build Status](https://travis-ci.org/hidehalo/emoji.svg)](https://travis-ci.org/hidehalo/emoji)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhidehalo%2Femoji.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhidehalo%2Femoji?ref=badge_shield)\n\nIf you want help with parse and store emoji symbol characters,you could think about use this library :)\n\n## Features\n\n1. Detected emoji symbols only\n2. Replace emoji symbols to other texts and turn it back\n3. Zero dependence\n4. Lightweight and fast\n\n## Install\n\n```bash\n$composer require hidehalo/emoji\n```\n\n## Usage\n\n### Parser\n\n```php\nrequire vendor/autoload.php;\nuse Hidehalo\\Emoji\\Parser;\n\n$parser = new Parser();\n$parser-\u003eparse($contents);\n```\n\n### Converter\n\n```php\n# if you want to replace those emoji symbols to ohter marked texts \n# and has ability to turn those back,\n# it has a built-in Protocol and Converter could do this\n# and $decoded will equals $raw,it is real very simple\n\nuse Hidehalo\\Emoji\\Converter;\n\n$converter = new Converter($parser);\n$encoded = $converter-\u003eencode($raw);\n$decoded = $converter-\u003edecode($encoded);\n\n# filter emojis\nuse Hidehalo\\Emoji\\Protocol\\Filter;\n\n$clean = $converter-\u003eencode($raw, new Filter);\n```\n\n### Custom protocol\n\nMaybe you want to impl your custom convert protocol,you can make it through implements [ProtocolInterface](src/Protocol/ProtocolInterface.php)\n\n```php\n\n\nuse Hidehalo\\Emoji\\Protocol\\ProtocolInterface as Protocol;\nuse Hidehalo\\Emoji\\Protocol\\PatternAwareTrait;\n\nclass CustomProto implments Protocol\n{\n    use PatternAwareTrait;\n\n    protected $format = \"FORMAT\";\n    protected $pattern = \"/FORMAT/\";\n\n    public function encode($contents)\n    {\n        //your impls\n    }\n\n    public function decode($contents)\n    {\n        //your impls\n    }\n}\n$customProto = new CustomProto;\n$customEncoded = $converter-\u003eencode($raw, $customProto);\n$customDecoded = $converter-\u003edecode($customDecoded, $customProto);\n```\n\n## Testing\n\n```bash\n$./vendor/bin/phpunit\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fhidehalo%2Femoji.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhidehalo%2Femoji?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidehalo%2Femoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhidehalo%2Femoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidehalo%2Femoji/lists"}