PHP Class Identicon\Generator\BaseGenerator

Author: Benjamin Laugueux ([email protected])
Afficher le fichier Open project: yzalis/identicon

Protected Properties

Свойство Type Description
$backgroundColor array
$color array
$generatedImage mixed
$pixelRatio integer
$size integer

Méthodes publiques

Méthode Description
getArrayOfSquare ( ) : array
getBackgroundColor ( ) : array Get the background color.
getColor ( ) : array Get the color.
getHash ( ) : string Get the identicon string hash.
getPixelRatio ( ) : integer Get the pixel ratio.
getSize ( ) : integer Get the image size.
setBackgroundColor ( string | array $backgroundColor ) Set the image background color.
setColor ( string | array $color ) Set the image color.
setSize ( integer $size ) Set the image size.
setString ( string $string ) Generate a hash from the original string.

Private Methods

Méthode Description
convertColor ( array | string $color ) : array
convertHashToArrayOfBoolean ( ) Convert the hash into an multidimensional array of boolean.
convertHexaToBoolean ( string $hexa ) : boolean Convert an hexadecimal number into a boolean.

Method Details

getArrayOfSquare() public méthode

public getArrayOfSquare ( ) : array
Résultat array

getBackgroundColor() public méthode

Get the background color.
public getBackgroundColor ( ) : array
Résultat array

getColor() public méthode

Get the color.
public getColor ( ) : array
Résultat array

getHash() public méthode

Get the identicon string hash.
public getHash ( ) : string
Résultat string

getPixelRatio() public méthode

Get the pixel ratio.
public getPixelRatio ( ) : integer
Résultat integer

getSize() public méthode

Get the image size.
public getSize ( ) : integer
Résultat integer

setBackgroundColor() public méthode

Set the image background color.
public setBackgroundColor ( string | array $backgroundColor )
$backgroundColor string | array The color in hexa (3 or 6 chars) or rgb array

setColor() public méthode

Set the image color.
public setColor ( string | array $color )
$color string | array The color in hexa (3 or 6 chars) or rgb array

setSize() public méthode

Set the image size.
public setSize ( integer $size )
$size integer

setString() public méthode

Generate a hash from the original string.
public setString ( string $string )
$string string

Property Details

$backgroundColor protected_oe property

protected array $backgroundColor
Résultat array

$color protected_oe property

protected array $color
Résultat array

$generatedImage protected_oe property

protected mixed $generatedImage
Résultat mixed

$pixelRatio protected_oe property

protected int $pixelRatio
Résultat integer

$size protected_oe property

protected int $size
Résultat integer