Download the PHP package renfordt/larvatar without Composer

On this page you can find all versions of the php package renfordt/larvatar. 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 larvatar

Larvatar

Badge Packagist Version Packagist PHP Version GitHub License GitHub Actions Workflow Status Code Climate coverage Code Climate maintainability

Larvatar is a package that combines different avatar styles, like Gravatar, Initials Avatar.

Installation

The recommended way of installing Larvatar is to use Composer. Run the following command to install it to you project:

Upgrading to 2.0

Version 2.0 brings many breaking changes. Check the Upgrade Guide to avoid any issues.

Basic Usage

Include the LarvatarTrait with use Renfordt\Larvatar\Traits\LarvatarTrait; in your user class and add the following method:

Adjust the method as you please, only requirement is that the methods name is getAvatar().

Advanced Usage

The general usage is simple. Create a new Larvatar class, insert name and email and the avatar type you wish.

Alternatively you can create an instance of the Name class, which provides you more possibilities.

There are currently nine different types of avatars available:

InitialsAvatar

Forms

The InitialsAvatar gives you the possibility to choose between three different forms. A circle, which is the default, a hexagon and a square. Choose it by using the setForm() method. The input is either a string or a value of the Enum FormTypes.

If you are using the hexagon form, you have additionally the possibility to rotate the form:

Colors

Usually the colors will be automatically selected by the provided name. If you for some case want to manually set the contrast of the colors, you can use the methods setBackgroundLightness() and setTextLightness(). The parameter is a float with a value range 0 to 1 where 0 means a darker color and 1 is a lighter color.

Additionally, you can change the offset which will generate a different color.

Font Weight

You can also change the font weight with the method setFontWeight().

Identicons (Larvatar Style)


All versions of larvatar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-gd Version *
meyfa/php-svg Version ^0.14.0
renfordt/clamp Version ^v1.0.1
renfordt/colors Version ^v1.0.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 renfordt/larvatar contains the following files

Loading the files please wait ....