peterkahl/country-code-to-emoji-flag 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

peterkahl/country-code-to-emoji-flag

最新稳定版本:v1.2.1

Composer 安装命令:

composer require peterkahl/country-code-to-emoji-flag

包简介

Converts country code to emoji flag.

README 文档

README

Downloads Download per Month License If this project has business value for you then don't hesitate to support me with a small donation.

Converts a country code to emoji flag. Most flags use a 2-letter code, but some use more (eg England=gbeng, Scotland=gbsct, Wales=gbwls, etc).

Example in action: Screenshot of emoji flags inside phpmyadmin table.

image

Example in action: Screenshot of a terminal window displaying a plain text log file.

image

Why Emoji❓

Emoji symbol is a textual replacement for a graphic image file while having the benefits of a graphic image. The image file is already present at your intended destination (a person's device), so why would you transmit the image to them again and again? -- Use emoji!

♻️Green Technology♻️

An image file equivalent to an emoji symbol may be tens, hundreds of kilobytes in size, while an emoji symbol is only several bytes. That's a bandwidth saving of around 10,000 times. If you use emoji instead of image files, you reduce your carbon footprint.

Plain Text Is Now 😎Faux Rich Text

Now you can include emoji in plain text files, even in plain text emails, making them sharp, colourful and rich looking. You can put emoji flags into your database too!

Emoji support: 🖥platform- and 🌍location-dependent‼️

Not every platform supports emoji. Therefore, use with caution! To my knowledge, iOS, macOS, Android are capable of displaying emoji. Additionally, some platforms (or geographical regions) may not be able to display certain flags. If unsure, use this as a reference and easy way to test your platform: http://unicode.org/emoji/charts/full-emoji-list.html

use peterkahl\flagMaster\flagMaster;

echo flagMaster::emojiFlag('uk');    # 🇬🇧
echo flagMaster::emojiFlag('gbwls'); # 🏴󠁧󠁢󠁷󠁬󠁳󠁿
echo flagMaster::emojiFlag('gbsct'); # 🏴󠁧󠁢󠁳󠁣󠁴󠁿
echo flagMaster::emojiFlag('gbeng'); # 🏴󠁧󠁢󠁥󠁮󠁧󠁿

统计信息

  • 总下载量: 57.12k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 31
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 1
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-04-11