flavioheleno / bigheads-php
Easily create characters for your projects (PHP Library for bigheads.io)
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/flavioheleno/bigheads-php
Requires
- php: ^7.4
- myclabs/php-enum: ^1.7
Requires (Dev)
- infection/infection: ^0.16.4
- php-parallel-lint/php-parallel-lint: ^1.2
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^9.1
- psy/psysh: ^0.10
- rector/rector: ^0.7.41
- squizlabs/php_codesniffer: ^3.5
- vimeo/psalm: ^3.12
This package is auto-updated.
Last update: 2025-10-10 05:00:43 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
| Name | Type | Default |
|---|---|---|
| Accessory | Enum | null |
| Body | Enum | null |
| CircleColor | Enum | null |
| Clothing | Enum | null |
| ClothingColor | Enum | null |
| Eyebrows | Enum | null |
| Eyes | Enum | null |
| FaceMask | Boolean | false |
| FaceMaskColor | Enum | null |
| FacialHair | Enum | null |
| Graphic | Enum | null |
| Hair | Enum | null |
| HairColor | Enum | null |
| Hat | Enum | null |
| HatColor | Enum | null |
| Lashes | Boolean | false |
| LipColor | Enum | null |
| Mask | Boolean | false |
| Mouth | Enum | null |
| Size | Integer | 100 |
| SkinTone | Enum | null |
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.