PHP Class RunMyBusiness\Initialcon\Initialcon

ファイルを表示 Open project: runmybusiness/initialcon Class Usage Examples

Public Methods

Method Description
displayImage ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) Display an Initialcon image.
getColor ( ) : string Get the color.
getFontPath ( ) : string Get the font path.
getHash ( ) : string Get the Initialcon string hash.
getImageData ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) : string Get an Initialcon PNG image data.
getImageDataUri ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) : string Get an Initialcon PNG image data.
getImageObject ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) : Intervention\Image\ImageManagerStatic Display an Initialcon image.
getSize ( ) : integer Get the image size.
getTextSize ( ) : integer Get the text size.
setColor ( string $color ) : Initialcon Set the image color.
setFontPath ( string $path ) Set the font path.
setIdentifier ( $identifier ) : Initialcon Generate a hash fron the identifier.
setInitials ( $initials ) : Initialcon Generate a hash fron the identifier.
setSize ( integer $size ) : Initialcon Set the image size.

Private Methods

Method Description
convertHashToArrayOfBoolean ( ) : Initialcon Convert the hash into an multidimensionnal array of boolean.
convertHexaToBoolean ( string $hexa ) : boolean Convert an heaxecimal number into a boolean.
generateImage ( $initials, $identifier, integer $size, $color ) Generate the Initialcon image.

Method Details

displayImage() public method

Display an Initialcon image.
public displayImage ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null )
$initials string
$identifier string
$size integer
$hexaColor string

getColor() public method

Get the color.
public getColor ( ) : string
return string

getFontPath() public method

Get the font path.
public getFontPath ( ) : string
return string

getHash() public method

Get the Initialcon string hash.
public getHash ( ) : string
return string

getImageData() public method

Get an Initialcon PNG image data.
public getImageData ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) : string
$initials string
$identifier string
$size integer
$hexaColor string
return string

getImageDataUri() public method

Get an Initialcon PNG image data.
public getImageDataUri ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) : string
$initials string
$identifier string
$size integer
$hexaColor string
return string

getImageObject() public method

Display an Initialcon image.
public getImageObject ( string $initials, string $identifier, integer $size = 64, string $hexaColor = null ) : Intervention\Image\ImageManagerStatic
$initials string
$identifier string
$size integer
$hexaColor string
return Intervention\Image\ImageManagerStatic

getSize() public method

Get the image size.
public getSize ( ) : integer
return integer

getTextSize() public method

Get the text size.
public getTextSize ( ) : integer
return integer

setColor() public method

Set the image color.
public setColor ( string $color ) : Initialcon
$color string The color in hexa (6 chars)
return Initialcon

setFontPath() public method

Set the font path.
public setFontPath ( string $path )
$path string

setIdentifier() public method

Generate a hash fron the identifier.
public setIdentifier ( $identifier ) : Initialcon
return Initialcon

setInitials() public method

Generate a hash fron the identifier.
public setInitials ( $initials ) : Initialcon
return Initialcon

setSize() public method

Set the image size.
public setSize ( integer $size ) : Initialcon
$size integer
return Initialcon