ShieldsIo
Table of content
About
This class is a helper to generate ShieldsIo badges. It builds the URL with basic personalization.
Requirements
No requirements.
Available methods
Generate badge URL
Generates the badge URL.
$shieldsIo = new ShieldsIo();
// Generates a flat GitHub badge with owner/repo text.
$url = $shieldsIo->generateBadgeUrl(null, 'owner/repo', 'black', 'flat', null, 'github');
echo $url;
// Outputs: https://img.shields.io/badge/owner%2Frepo-black?style=flat&logo=github
// Generates a social GitHub badge with owner text.
$url = $shieldsIo->generateBadgeUrl(null, 'owner', 'black', 'social', null, 'github');
echo $url;
// Outputs: https://img.shields.io/badge/owner-black?style=social&logo=github