flavioheleno/bigheads-php

Easily create characters for your projects (PHP Library for bigheads.io)

dev-master 2021-02-09 18:24 UTC

This package is auto-updated.

Last update: 2024-12-10 03:18:50 UTC


README

Easily generate avatars for your projects with Big Heads.

This is a PHP Library that helps you build Big Heads (original project: RobertBroersma/bigheads).

Install with composer

composer require flavioheleno/bigheads-php

Creating a random Big Head

The Factory class can be used to generate a Big Head with randomized properties.

$bigHead = BigHeads\Factory::create();

Getting the Big Head URL

Retrieve the URL to use on an <img /> tag, for example.

$bigHead->getUrl();

Storing/Recoving

Whenever the original class is required, it can be serialized and stored in plain text.

$serialized = serialize($bigHead);

$bigHead2 = unserialize($serialized);

Property Reference

Contributing

There are a few helper scripts that can be called by composer, such as:

  • Static Code Analysis: php composer.phar run check
  • Code Linting: php composer.phar run lint
  • Tests: php composer.phar run test

NOTE: to run the Code Linting, you must download the ruleset from here first.

License

This library is licensed under the MIT License.