承接 flying-anvil/badge-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

flying-anvil/badge-generator

Composer 安装命令:

composer require flying-anvil/badge-generator

包简介

It generates badges as .svg

README 文档

README

Tool for generating badges, like

coverage php-version

How To

Executable Script

Run the generate.php script to generate a badge.

It accespts some parameters to customize the result:

shortlongdescriptiondefault
ooutputfile to write tostdout
lleftspecifies the left text
rrightspecifies the right text
gno-gradientno value, removes the gradient in the badgeomitted
pno-percentage-coloringno value, disables auto-coloring based on the right textomitted
radiusradius of the edges5.0
left-text-colorcolor of the left texteeeeee
right-text-colorcolor of the right texteeeeee
left-background-colorbackground color of the left segment555555
right-background-colorbackground color of the right segment4B3D6C
low-percent-colorright background color for 0% when using auto coloringB31329
mid-percent-colorright background color for 50% when using auto coloringCDAB58
hight-percent-colorright background color for 100% when using auto coloring2AC258

Using Generator

Create a Generator and feed it with some options:

<?php

require_once __DIR__ . '/../vendor/autoload.php';

$badgeOptions = \FlyingAnvil\BadgeGenerator\Application\DataObject\BadgeOptions::create('left', 'right');
$badgeOptions->setLeftText('direction');
$badgeOptions->setRadius(3);
$badgeOptions->setLeftBackgroundColor(\FlyingAnvil\BadgeGenerator\Application\DataObject\Color::createFromHex('00cc00'));

$badgeGenerator = new \FlyingAnvil\BadgeGenerator\Application\Service\Generator();
$badge          = $badgeGenerator->generate($badgeOptions);

echo $badge;

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固