{"id":18578324,"url":"https://github.com/astrotomic/php-twemoji","last_synced_at":"2025-04-10T10:31:05.462Z","repository":{"id":44604321,"uuid":"307185950","full_name":"Astrotomic/php-twemoji","owner":"Astrotomic","description":"Easily generate Twemoji URLs","archived":false,"fork":false,"pushed_at":"2023-11-01T06:51:25.000Z","size":64,"stargazers_count":31,"open_issues_count":6,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-29T21:06:02.394Z","etag":null,"topics":["php","treeware","twemoji"],"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/Astrotomic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["Gummibeer","SarahSibert"],"issuehunt":"astrotomic","custom":["https://forest.astrotomic.info"]}},"created_at":"2020-10-25T20:26:27.000Z","updated_at":"2024-02-26T06:39:26.000Z","dependencies_parsed_at":"2023-02-09T14:46:20.087Z","dependency_job_id":"d7bde182-ff2d-43e0-a758-a2847f91ddae","html_url":"https://github.com/Astrotomic/php-twemoji","commit_stats":{"total_commits":35,"total_committers":9,"mean_commits":3.888888888888889,"dds":0.5714285714285714,"last_synced_commit":"911698de99507ce685a1a0cf9fb54430a7f7bafb"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-twemoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-twemoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-twemoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fphp-twemoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrotomic","download_url":"https://codeload.github.com/Astrotomic/php-twemoji/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"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":["php","treeware","twemoji"],"created_at":"2024-11-06T23:34:40.327Z","updated_at":"2025-04-10T10:31:05.147Z","avatar_url":"https://github.com/Astrotomic.png","language":"PHP","funding_links":["https://github.com/sponsors/Gummibeer","https://github.com/sponsors/SarahSibert","https://issuehunt.io/r/astrotomic","https://forest.astrotomic.info"],"categories":[],"sub_categories":[],"readme":"# PHP Twemoji\n\n[![Latest Version](http://img.shields.io/packagist/v/astrotomic/php-twemoji.svg?label=Release\u0026style=for-the-badge)](https://packagist.org/packages/astrotomic/php-twemoji)\n[![MIT License](https://img.shields.io/github/license/Astrotomic/php-twemoji.svg?label=License\u0026color=blue\u0026style=for-the-badge)](https://github.com/Astrotomic/php-twemoji/blob/master/LICENSE)\n[![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge)](https://plant.treeware.earth/Astrotomic/php-twemoji)\n[![Larabelles](https://img.shields.io/badge/Larabelles-%F0%9F%A6%84-lightpink?style=for-the-badge)](https://www.larabelles.com/)\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Astrotomic/php-twemoji/run-tests?style=flat-square\u0026logoColor=white\u0026logo=github\u0026label=Tests)](https://github.com/Astrotomic/php-twemoji/actions?query=workflow%3Arun-tests)\n[![StyleCI](https://styleci.io/repos/307185950/shield)](https://styleci.io/repos/307185950)\n[![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/php-twemoji.svg?label=Downloads\u0026style=flat-square)](https://packagist.org/packages/astrotomic/php-twemoji)\n\nThis package provides a fluent PHP OOP builder for [Twemoji](https://twemoji.twitter.com) URLs.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require astrotomic/php-twemoji\n```\n\n## Usage\n\n### Single Emojis\n\nYou can use the `Twemoji::emoji()` method to get the Twemoji image URL for a single emoji.\n\n```php\nuse Astrotomic\\Twemoji\\Twemoji;\n\nTwemoji::emoji('🎉')-\u003eurl();\n// https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f389.svg\n\nTwemoji::emoji('🎉')-\u003epng()-\u003eurl();\n// https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/72x72/1f389.png\n\nTwemoji::emoji('🎉')-\u003ebase('https://twemoji.astrotomic.info')-\u003eurl();\n// https://twemoji.astrotomic.info/svg/1f389.svg\n```\n\n### Multiple Emojis in Text\n\nIf you have a text and want to replace all emojis with Twemoji image tags (Markdown or HTML) you can use the `Twemoji::text()` method.\nThis isn't aware of emojis in attributes or anything - it just finds and replaces all Emojis in the given string.\n\n```php\nuse Astrotomic\\Twemoji\\Twemoji;\n\nTwemoji::text(\"Hello 👋🏿\")-\u003etoMarkdown();\n// Hello ![👋🏿](https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44b-1f3ff.svg)\n\nTwemoji::text(\"Hello 👋🏿\")-\u003epng()-\u003etoMarkdown();\n// Hello ![👋🏿](https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/72x72/1f44b-1f3ff.png)\n```\n\nIn case you want to configure the replacer once and bind it to your container for example you can do that as well.\n\n```php\nuse Astrotomic\\Twemoji\\Replacer;\n\n$replacer = (new Replacer())-\u003epng();\n\n$replacer-\u003etext(\"Hello 👋🏿\")-\u003etoMarkdown();\n// Hello ![👋🏿](https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/72x72/1f44b-1f3ff.png)\n```\n\nYou can also override the replacer configuration for the specific replace operation without altering the replacer configuration.\n\n```php\n$replacer-\u003etext(\"Hello 👋🏿\")-\u003esvg()-\u003etoMarkdown();\n// Hello ![👋🏿](https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/1f44b-1f3ff.svg)\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).\n\n### Security\n\nIf you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.\n\n## Credits\n\n-   [Tom Witkowski](https://github.com/Gummibeer)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Treeware\n\nYou're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.\n\nIt’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.\n\nYou can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/php-twemoji)\n\nRead more about Treeware at [treeware.earth](https://treeware.earth)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fphp-twemoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrotomic%2Fphp-twemoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fphp-twemoji/lists"}