2017 © Pedro Peláez
 

library phpbadge

A PHP library to create badges.

image

phpbadge/phpbadge

A PHP library to create badges.

  • Monday, February 15, 2016
  • by waltertamboer
  • Repository
  • 4 Watchers
  • 21 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

phpbadge

Build Status Scrutinizer Code Quality Code Coverage Dependency Status SensioLabsInsight, (*1)

A PHP library to build badges as seen in README's of many open source libraries., (*2)

Getting started

It's recommended to install this library via Composer., (*3)

composer require phpbadge/phpbadge

The current master branch is considered stable. The badges on top of this document should confirm this., (*4)

Requirements

As from version 2.0.0 this library needs a PHP version >= 7.1., (*5)

Older version of the library run on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, PHP 7 and HHVM., (*6)

Example

<?php

use PHP\Badge\Badge;
use PHP\Badge\Font\Font;
use PHP\Badge\Font\GdDimensionCalculator;
use PHP\Badge\Part;
use PHP\Badge\Renderer\SvgRenderer;

require 'vendor/autoload.php';

$badge = new Badge();
$badge->setBorderRadius(3);
$badge->addPart(new Part('build', '#555', '#fff', new Font(11, 'verdana', 'fonts/verdana.ttf')));
$badge->addPart(new Part('passing', '#4c1', '#fff', new Font(11, 'verdana', 'fonts/verdana.ttf')));

$renderer = new SvgRenderer(new GdDimensionCalculator());

echo $renderer->render($badge);

The Versions

15/02 2016

dev-master

9999999-dev

A PHP library to create badges.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

button badge badges pose phpbadge

15/02 2016

1.0.0

1.0.0.0

A PHP library to create badges.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

button badge badges pose phpbadge