LaravelPackages.net
Acme Inc.
Toggle sidebar
laradic/annotation-scanner

Scan directories or files for annotations

54
1
1.0.0
About laradic/annotation-scanner

laradic/annotation-scanner is a Laravel package for scan directories or files for annotations . It currently has 1 GitHub stars and 54 downloads on Packagist (latest version 1.0.0). Install it with composer require laradic/annotation-scanner. Discover more Laravel packages by laradic or browse all Laravel packages to compare alternatives.

Last updated

Laradic Icon Generator

Source License Framework

Icon Generator can create PNG images from several icon fonts like FontAwesome, Foundation Icons, etc. For example, useful for favicon generation.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

Installation

composer require "laradic/annotation-scanner:~1.0"

Quick Overview

Full documenation @ la.radic.nl

Using the default generators

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

use Laradic\IconGenerator\Factory;
use Laradic\IconGenerator\IconGenerator;

$icons = new Factory;
$icons->addDefaultFonts();
$generator = $icons->createGenerator('font-awesome');
$generator->setIcons('android', 'car', 'html5', 'github');

// 16x16px, 32x32px, etc
$generator->setSizes(16, 32, 64, 128);

// add some material colors
$generator->addColor('#ef5350'); // red 400
$generator->addColor('#42A5F5'); // blue 400
$generator->addColor('#424242'); // grey 800
$generator->addColor(251, 94, 11); // RGB Also supported

$generator->setOutDir(__DIR__ . '/../generated');

$generator->generate($prefix);

$generator->generate();

Using the default generators

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

use Laradic\IconGenerator\Factory;
use Laradic\IconGenerator\IconGenerator;

$icons = new Factory;
$icons->addDefaultFonts();
$generate = function (IconGenerator $generator, $prefix = '') {

    // 16x16px, 32x32px, etc
    $generator->setSizes(16, 32, 64, 128);

    // add some material colors
    $generator->addColor('#ef5350'); // red 400
    $generator->addColor('#42A5F5'); // blue 400
    $generator->addColor('#424242'); // grey 800

    $generator->setOutDir(__DIR__ . '/../generated');

    $generator->generate($prefix);
};


$fa = $icons->createGenerator('font-awesome');
$fa->setIcons('android', 'car', 'html5', 'github');
$generate($fa, 'fa-');


$found = $icons->createGenerator('foundation-general');
$found->setIcons([ 'checkmark', 'remove', 'mail', 'calendar' ]);
$generate($found, 'found-');
Comments