百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

php_badge

> 编程语言
开源

这是一个基于 SVG 的标识符,可以快速生成各种标签和状态标识符

182 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一个基于 SVG 的标识符,可以快速生成各种标签和状态标识符

Badge

This is an identification tag based on SVG, It can quickly generate various labels and status identifiers.

v5.0.0 New version testing

The new border mode can also customize the border color, redesign and adjust the fillet of the badge to make it look more stereoscopic, and add new functions to optimize the program code.

test example:

php
    https://org.vercel.app

Sponsors Example

php
    $Badge->Icon = file_get_contents({LOGO}); //
    array(
     array({MESSAGE},{COLOR})
    );

Hits Example

php
    //https://example.com/Hits/{USERNAME}/{PROJECT}/image.svg
    
    ++$count;
    array(
     array('hits','555555'),
     array($count,'4C1')
    );

Server Example

php
    //https://example.com/Server/{USERNAME}/{PROJECT}/image.svg
    
    array(
     array('{OS}','555555'),
     array('CPU: {CPU}','A0ABFC'),
     array('RAM: {RAM}','F0A010')
    );    

State Example

php
    //https://example.com/Label/{LOGO}/{MESSAGE}/{COLOR}.svg
    
    //get logo file
    $Badge->Icon = file_get_contents({LOGO}); //
    $Badge->viewBox = '-120 -85 1200 1200'; //Svg Icon x, y, Width, Height
    $Badge->opacity = 0.7; //transparency (0 - 1)
    
    array(
     array({MESSAGE},{COLOR})
    );

Label Example

php
    //https://example.com/Label/{LABEL}/{MESSAGE}/{COLOR}.svg
    
    $Badge->Icon = file_get_contents({LOGO}); //
    array(
     array({LABEL},'555555'),
     array({MESSAGE},{COLOR})
    );

Travis CI badge

codecov badge

Packagist badge

Github badge

Installation

Use Composer to install the library. Of course, You can go to Packagist to view.

bash
    $ composer require yakeing/php_badge

Initialization parameter

  • Sample:
php

    $arr = array(
        array('build', '555'), //#555555
        array('passing', '4c1'), //#44CC11
        ..........
    );

    $Badge = new Badge();
    $Badge->svg($arr);

Sponsor

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate. Author

weibo: yakeing

twitter: yakeing

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPbadgeiconsphpsvg

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言