stidges / country-flags
A small package to convert a country code to the corresponding country flag emoji
Installs: 183 505
Dependents: 4
Suggesters: 0
Security: 0
Stars: 30
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: ^7.3|^8.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-11-09 00:30:20 UTC
README
A small package to convert a country code to the corresponding country flag emoji.
Note: Emoji flags are not supported on Windows, which displays two-letter country codes instead of emoji flag images.
Installation
You can install the package via Composer:
$ composer require stidges/country-flags
Basic Usage
$countryFlag = new CountryFlag; echo $countryFlag->get('NL'); // "🇳🇱"
Aliasing
If you would like to make country codes available under a custom aliases, you can pass these to the constructor:
$countryFlag = new CountryFlag([ 'AA' => 'NL', ]); echo $countryFlag->get('AA'); // "🇳🇱"
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email info@stidges.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.