ZenMagick 0.9.6


org.zenmagick.model.catalog.ZMImageInfo

Class ZMImageInfo

ZMObject
|
+--ZMImageInfo

public class ZMImageInfo
extends ZMObject

Image information.

Author:
DerManoMann
Version:
$Id: ZMImageInfo.php 2124 2009-03-31 09:23:51Z dermanomann $

Field Summary
protected mixed

$altText_

protected mixed

$imageDefault_

protected mixed

$imageLarge_

protected mixed

$imageMedium_

protected mixed

$parameter_

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMImageInfo(string image, string alt)

Create new image info.

Method Summary
static array

getAdditionalImages(string image)

Look up additional product images.

string

getAltText()

Get the alt text.

string

getDefaultImage()

Get the default image.

string

getFormattedParameter()

Get the parameter formatted as key="value" .

string

getLargeImage()

Get the large image.

string

getMediumImage()

Get the medium image.

array

getParameter()

Get the parameter.

boolean

hasImage()

Check if there is an image.

boolean

hasLargeImage()

Check if there is a large image.

boolean

hasMediumImage()

Check if there is a medium image.

void

setParameter(mixed parameter)

Set the parameter.

static array

splitImageName(string image)

Split image name into components that we need to process it.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Field Detail

altText_

protected mixed $altText_

imageDefault_

protected mixed $imageDefault_

imageLarge_

protected mixed $imageLarge_

imageMedium_

protected mixed $imageMedium_

parameter_

protected mixed $parameter_

Constructor Detail

ZMImageInfo

public ZMImageInfo(string image, string alt)

Create new image info.

Parameters:
image - The image name.
alt - The alt text.

Method Detail

getAdditionalImages

public static array getAdditionalImages(string image)

Look up additional product images.

Parameters:
image - The image to look up.
Returns:
An array of ZMImageInfo instances.

getAltText

public string getAltText()

Get the alt text.

Returns:
The alt text.

getDefaultImage

public string getDefaultImage()

Get the default image.

Returns:
The default image.

getFormattedParameter

public string getFormattedParameter()

Get the parameter formatted as key="value" .

Returns:
HTML formatted parameter.

getLargeImage

public string getLargeImage()

Get the large image.

Returns:
The large image.

getMediumImage

public string getMediumImage()

Get the medium image.

Returns:
The medium image.

getParameter

public array getParameter()

Get the parameter.

Returns:
Map of key/value pairs.

hasImage

public boolean hasImage()

Check if there is an image.

Returns:
true if there is an image, false if not.

hasLargeImage

public boolean hasLargeImage()

Check if there is a large image.

Returns:
true if there is a large image, false if not.

hasMediumImage

public boolean hasMediumImage()

Check if there is a medium image.

Returns:
true if there is a medium image, false if not.

setParameter

public void setParameter(mixed parameter)

Set the parameter.

Parameters:
parameter - Additional parameter for the <mg> tag; can be either * a query string style list of name/value pairs or a map.

splitImageName

public static array splitImageName(string image)

Split image name into components that we need to process it.

Parameters:
image - The image.
Returns:
An array consisting of [optional subdirectory], [file extension], [basename]

ZenMagick 0.9.6