定制 imsidz/fontawesome-generator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

imsidz/fontawesome-generator

Composer 安装命令:

composer require imsidz/fontawesome-generator

包简介

Faker extension for randomly picking a FontAwesome Icon

README 文档

README

Faker extension for randomly picking a FontAwesome (5.11.0 / 2019-11-15) icon.

The library contains all of FontAwesome's Library.

Installation

composer require imsidz/fontawesome-generator

Alternatively, add to your composer.json file with:

"require": {
        "imsidz/fontawesome-generator": "dev-master"
    }

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/imsidz/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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固