PHP Класс Identicon\Generator\BaseGenerator

Автор: Benjamin Laugueux ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$backgroundColor array
$color array
$generatedImage mixed
$pixelRatio integer
$size integer

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

getArrayOfSquare() публичный Метод

public getArrayOfSquare ( ) : array
Результат array

getBackgroundColor() публичный Метод

Get the background color.
public getBackgroundColor ( ) : array
Результат array

getColor() публичный Метод

Get the color.
public getColor ( ) : array
Результат array

getHash() публичный Метод

Get the identicon string hash.
public getHash ( ) : string
Результат string

getPixelRatio() публичный Метод

Get the pixel ratio.
public getPixelRatio ( ) : integer
Результат integer

getSize() публичный Метод

Get the image size.
public getSize ( ) : integer
Результат integer

setBackgroundColor() публичный Метод

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() публичный Метод

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

setSize() публичный Метод

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

setString() публичный Метод

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

Описание свойств

$backgroundColor защищенное свойство

protected array $backgroundColor
Результат array

$color защищенное свойство

protected array $color
Результат array

$generatedImage защищенное свойство

protected mixed $generatedImage
Результат mixed

$pixelRatio защищенное свойство

protected int $pixelRatio
Результат integer

$size защищенное свойство

protected int $size
Результат integer