class Image extends Base

Shop3 Imageproperty class.

Constants

KEY_TYPE

KEY_WIDTH

KEY_HEIGHT

KEY_CONTAINER

KEY_FORMAT

KEY_QUALITY

KEY_BACKGROUNDCOLOR

KEY_GLOBALS

KEY_NAME

KEY_VALUE

Properties

protected $_required
protected $_required_globals

Methods

__construct(array $images = array())

Contructor.

addImage(string $type, integer $width, integer $height, boolean $container, string $format, integer $quality, string $backgroundcolor)

Adds a image to the data array.

addImages(array $images)

Adding multiple images at once.

delImage(string $type)

Removes a image from the data array by type.

boolean
validateImageArray(array $image)

Validates a image array and throws a exception with the failure.

Boolean
existsImage(string $type)

Checks if a image with that type already exists.

array
getImages()

Returns all Images.

addGlobal(string $name, mixed $value)

Adds a global image property to the class.

addGlobals(array $globals)

Adding multiple globals at once.

delGlobal(string $global)

Removes a global from the data array by type.

boolean
validateGlobalArray(array $global)

Validates a name array and throws a exception with the failure.

Boolean
existsGlobal(string $type)

Checks if a image with that type already exists.

Details

at line 53
__construct(array $images = array())

Contructor.

Parameters

array $images

at line 75
addImage(string $type, integer $width, integer $height, boolean $container, string $format, integer $quality, string $backgroundcolor)

Adds a image to the data array.

Parameters

string $type The name of our image type.
integer $width The width of this image types.
integer $height The height of this image types.
boolean $container Defines if the image should be rendered with container or not.
string $format The image format like JPG or PNG
integer $quality The quality in percent from 1-100
string $backgroundcolor The background color of this image.

Exceptions

ConfigException If the image already exists

at line 99
addImages(array $images)

Adding multiple images at once.

Parameters

array $images Array of images, with the same parameters as in addImage.

at line 115
delImage(string $type)

Removes a image from the data array by type.

Parameters

string $type

Exceptions

ConfigException

at line 129
boolean validateImageArray(array $image)

Validates a image array and throws a exception with the failure.

Parameters

array $image Array with all needed parameters for an image (see: addImage)

Return Value

boolean

Exceptions

ConfigException

at line 148
protected Boolean existsImage(string $type)

Checks if a image with that type already exists.

Parameters

string $type The image type.

Return Value

Boolean

at line 158
array getImages()

Returns all Images.

Return Value

array

at line 169
addGlobal(string $name, mixed $value)

Adds a global image property to the class.

Parameters

string $name
mixed $value

at line 185
addGlobals(array $globals)

Adding multiple globals at once.

Parameters

array $globals

at line 199
delGlobal(string $global)

Removes a global from the data array by type.

Parameters

string $global

Exceptions

ConfigException

at line 213
boolean validateGlobalArray(array $global)

Validates a name array and throws a exception with the failure.

Parameters

array $global Array with all needed parameters for an name (see: addGlobal)

Return Value

boolean

Exceptions

ConfigException

at line 232
protected Boolean existsGlobal(string $type)

Checks if a image with that type already exists.

Parameters

string $type The image type.

Return Value

Boolean