tryfirst/fontawesome-generator 问题修复 & 功能扩展

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

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

tryfirst/fontawesome-generator

Composer 安装命令:

composer require tryfirst/fontawesome-generator

包简介

Faker extension for randomly picking a FontAwesome Icon

README 文档

README

Faker extension for randomly picking a FontAwesome (5.9.0 / 2019-07-14) icon.

Faker Extension

An extension of the fzaninotto/Faker PHP Library. This has two functions that will either return a random icon name or the entire array of names. This extension was forked from IORoot/faker-fontawesome.

The library contains all of FontAwesome's Library.

Installation

composer require tryfirst/fontawe-somegenerator

Alternatively, add to your composer.json file with:

"require": {
        "tryfirst/fontawe-somegenerator": "v0.0.2"
    }

Usage

Use the FontAwesomeGeneratorProvider class in combination with Faker to produce the random font name:

    <?php
    require __DIR__ .'/vendor/autoload.php';

    use faker\provider\FontAwesomeGeneratorProvider;

    $faker = Faker\Factory::create();
    $faker->addProvider(new FontAwesomeGeneratorProvider($faker));
    $colour = $faker->fontAwesomeIcon();
    ?>
    <i style="font-size:200px" class="fa <?php echo $icon; ?>" aria-hidden="true"></i>

This will generate an i tag with a random fontawesome icon.

Example index file

Within the vendor/tryfirst/fontawesomegenerator/ folder you will find an index.php file which can be moved to your root directory and will provide an example of both functions.

Example inde file Sample output

Tests

There are two PHPUnit tests that will check that the library will return a correct FontAwesome name value and that it is contained within the 5.9.0 library.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固