Download the PHP package steppinghat/emoji-detector without Composer

On this page you can find all versions of the php package steppinghat/emoji-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package emoji-detector

PHP Emoji Detector

Build Status Unicode Version

Have an input string full of emoji's and you want to know detailed information about each emoji? Want to build an easy way to validate emoji's that come in as input data?

This :clap: is :clap: the :clap: library :clap: you :clap: want!

What does this thing do?

This library simply parses input strings and returns a list of relevant information about emoji's that are present in the string. It currently supports version 15.1 of the emoji standard.

Installation

Install this library using composer

Usage

The Model

For most outputs, the library will provide an EmojiInfo object that contains all of the relevant information about an emoji. The object will contain the following information:

Property Description
emoji The emoji chacater itself
name A user friendly name of the specific emoji
shortName A shortened name of the emoji
category A user friendly category name for the emoji
skinTone The level of skin tone of the emoji (if present)
hexCodes An array of individual hexadecimal characters that are used to make up the emoji
offset The position in the string where the emoji starts
mbOffset The multibyte position in the string where the emoji starts

All of these properties are protected, but can be accessed by their appropriate getters and setters. E.g. getCategory() or getSkinTone().

Emoji detection

This example is the most common usage of the detector, returning an array of objects that provide detailed information about each emoji found in the input string.

The library has full support for complex emoji's that make use of the ZWJ (Zero Width Joiner) character.

The above will produce the following output:

Testing for single emojis

Sometimes it is handy to test if an input string is a single emoji on it's own.

Testing if a string is completely emojis

Similar to calling, isSingleEmoji, calling isEmojiString will check if a string only contains emojis.

Tests

Included for library development purposes is a small set of test cases to assure that basic library functions work as expected. These tests can be launched by running the following:

License

Made with :heart: by Javan Eskander

Available for use under the MIT license.

Emoji data sourced from amio/emoji.json


All versions of emoji-detector with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-mbstring Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package steppinghat/emoji-detector contains the following files

Loading the files please wait ....