An open API service indexing awesome lists of open source software.

https://github.com/technicalguru/php-font-awesome

Provides Free Font Awesome for PHP apps
https://github.com/technicalguru/php-font-awesome

List: php-font-awesome

Last synced: about 2 months ago
JSON representation

Provides Free Font Awesome for PHP apps

Awesome Lists containing this project

README

          

# php-font-awesome
Provides Free Font Awesome icons for PHP apps.

# License
This project is licensed under [GNU LGPL 3.0](LICENSE.md).

# Installation

## By Composer

```
composer install technicalguru/font-awesome
```

## By Package Download
You can download the source code packages from [GitHub Release Page](https://github.com/technicalguru/php-font-awesome/releases)

# How to use

## Get the provided version number

```
$version = \TgFontAwesome\FontAwesome::getVersion();
```

## Get the URI of a font library

The following method will give you URIs for your further inspection:

```
use TgFontAwesome\FontAwesome;

// Get URI to all icons library, as minified CSS
$uri = FontAwesome::getUri();

// Get URI to all icons library, as uncompressed CSS
$uri = FontAwesome::getUri('all');

// Get URI to all icons library, as minified Javascript
$uri = FontAwesome::getUri('all.min', FontAwesome::JS);
```

You can get the correct HTML script tag to be included in your HTML output in the same way:

```
use TgFontAwesome\FontAwesome;

// Get stylesheet tag to all icons library, as minified CSS
$tag = FontAwesome::getLink();

// Get stylesheet tag to all icons library, as uncompressed CSS
$tag = FontAwesome::getLink('all');

// Get tag to all icons library, as minified Javascript
$tag = FontAwesome::getLink('all.min', FontAwesome::JS);
```

All methods will throw an `FontAwesomeException` when you ask for a non-existing library.

# Contribution
Report a bug, request an enhancement or pull request at the [GitHub Issue Tracker](https://github.com/technicalguru/php-font-awesome/issues).