Download the PHP package hedronium/avity without Composer

On this page you can find all versions of the php package hedronium/avity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package avity

Avity


Logo

Highly Customizable Identicon Generator for PHP.

Installation

Get it through composer cli.

Getting Started

Thats it thats all you really need to generate an Identicon. The above code will generate an Identicon based on Random values.

Basic Customization

Customizing Image Dimensions

You can call the height($value) and width($value) method on the Avity instance after initialization. Like:

Yes, its a Fluent API, method chaining is cool!

Customizing Background & Foreground Color

Both the methods accept $r, $g, $b parameters.

Dark

Customizing the Grid

3 by 3

Padding

Padding

Style Specific Customizations.

Often the style class used has specific methods that customize its behaviour which are not directly available on the Avity object for such cases the style instance can be fetched with the style() method on the Avity instance.

Like:

Varied Color Varied Color

Controlling the Output

Output Format

Avity can output as jpg, png or gif

Output Quality

The quality of the generated image may also be set. Give it a number between 1 and 100. (Only aplicable for jpg & png)

Output To Browser

Output To File

Generators

Generators are objects that generate numbers. These numbers are used by Layouts to set blocks onto the grid.

To use a different generator you can pass in an associative array of options with the generator key and the class bane as the value. Like:

available classes:

The Hash Generator

Once you got the generator setup like above to pass in a value to hash you can call hash() on the Avity instance. (it can be anything, like the user's username or email address or id)

This will generate the same identicon each time you give it the same value to hash.

Layouts

Layout objects use Generator objects to set blocks onto the grid. Avity comes with 3 built in Layout classes:

Avity Avity

changing the layout class

Styles

Style objects use Layout objects to draw the grid onto a canvas. Avity comes with 4 built in Style classes:

Avity Avity

changing the style class

spacing()

Avity

All built in Style classes have a spacing(_int_ $value) method that can be used to set the space between blocks. Like:

variedColor()

This ones a fun method available to all default Style classes. Just call it and see the magic happen. Like:

Advanced Customization

Custom Generator

A generator class should always extend Hedronium\Avity\Generator example:

Using a custom generator

Take construction into your own hands.

Custom Layouts

A generator class should always extend Hedronium\Avity\Layout

Please check the source code for more details. (We promise its simple and readable.)

Using a custom layout

take construction into your own hands.

the callback receive the generator instance as it's very likely that you will be generating the grid based on the generaotr output.


All versions of avity with dependencies

PHP Build Version
Package Version
Requires imagine/imagine Version 0.6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hedronium/avity contains the following files

Loading the files please wait ....