Download the PHP package awps/font-awesome-php without Composer
On this page you can find all versions of the php package awps/font-awesome-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download awps/font-awesome-php
More information about awps/font-awesome-php
Files in awps/font-awesome-php
Package font-awesome-php
Short Description A PHP library for Font Awesome.
License GPL-3.0+
Informations about the package font-awesome-php
A PHP library for Font Awesome.
This repository contains the necessary data to work with Font Awesome in PHP.
Requirements:
- Font Awesome 4.7.0
- PHP 5.3+.
License
- MIT - Details
Installation
With composer:
Manually:
Usage
The library contains 2 main classes that are created for public:
Awps\FontAwesome()
- Uses a static array of FA icons.(Recommended)Awps\FontAwesomeReader( $css_path )
- Generates the array fromfont-awesome.css
file. You must define the path to this file.
Create an instance:
Next it's easy. You can get the array of icons just by doing this.
API:
->getAllData()
->getCssClasses()
->getUnicodeKeys()
->getReadableNames()
->sortByName()
Attention: This modifies the original array. You can reset it back using ->reset()
method.
Utilities:
->total()
Return the total number of icons from original array.
->getIconUnicode( $icon_class )
Get the unicode by icon class.
Example:
->getIconName( $icon_class )
Get the readable icon name by class.
Example:
->getIcon( $icon_class )
Get the details of a single icon by class.
Example:
->getIconByUnicode( $unicode )
Get the details of a single icon by unicode.
Example:
->reset()
Reset the current array to its original state
Example: