ZenMagick 0.9.8


org.zenmagick.store.model.catalog.ZMAttribute
\store\model\catalog\ZMAttribute.php at line 34

Class ZMAttribute

ZMObject
└─ZMAttribute

public class ZMAttribute
extends ZMObject

A single attribute.

Author:
DerManoMann
Version:
$Id: ZMAttribute.php 2694 2009-12-03 22:32:18Z dermanomann $

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMAttribute(int id, string name, string type)

Create new attribute.

Method Summary
void

addValue(ZMAttributeValue value)

Add an attribute value.

void

clearValues()

Clear all values.

string

getComment()

Get the attribute comment.

int

getId()

Get the attribute id.

string

getName()

Get the attribute name.

int

getProductId()

Get the product id.

int

getSortOrder()

Get the attribute sort order.

string

getType()

Get the attribute type.

array

getValues()

Get the attribute values.

void

removeValue(mixed value)

Remove an attribute value.

void

setComment(string comment)

Set the attribute comment.

void

setId(int id)

Set the attribute id.

void

setName(string name)

Set the attribute name.

void

setProductId(int productId)

Set the product id.

void

setSortOrder(int sortOrder)

Set the attribute sort order.

string

setType(mixed type)

Set the attribute type.

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

Constructor Detail

\store\model\catalog\ZMAttribute.php at line 50

ZMAttribute

public ZMAttribute(int id, string name, string type)

Create new attribute.

Parameters:
id - The id.
name - The name.
type - The type.

Method Detail

\store\model\catalog\ZMAttribute.php at line 162

addValue

public void addValue(ZMAttributeValue value)

Add an attribute value.

Parameters:
value - A ZMAttributeValue.

\store\model\catalog\ZMAttribute.php at line 167

clearValues

public void clearValues()

Clear all values.


\store\model\catalog\ZMAttribute.php at line 106

getComment

public string getComment()

Get the attribute comment.

Returns:
The attribute comment.

\store\model\catalog\ZMAttribute.php at line 71

getId

public int getId()

Get the attribute id.

Returns:
The attribute id.

\store\model\catalog\ZMAttribute.php at line 85

getName

public string getName()

Get the attribute name.

Returns:
The attribute name.

\store\model\catalog\ZMAttribute.php at line 78

getProductId

public int getProductId()

Get the product id.

Returns:
The product id.

\store\model\catalog\ZMAttribute.php at line 99

getSortOrder

public int getSortOrder()

Get the attribute sort order.

Returns:
The attribute sort order.

\store\model\catalog\ZMAttribute.php at line 92

getType

public string getType()

Get the attribute type.

Returns:
The attribute type.

\store\model\catalog\ZMAttribute.php at line 113

getValues

public array getValues()

Get the attribute values.

Returns:
A list of ZMAttributeValue objects.

\store\model\catalog\ZMAttribute.php at line 176

removeValue

public void removeValue(mixed value)

Remove an attribute value.

Parameters:
value - Either a ZMAttributeValue instance or a value id.

\store\model\catalog\ZMAttribute.php at line 155

setComment

public void setComment(string comment)

Set the attribute comment.

Parameters:
comment - The attribute comment.

\store\model\catalog\ZMAttribute.php at line 120

setId

public void setId(int id)

Set the attribute id.

Parameters:
id - The attribute id.

\store\model\catalog\ZMAttribute.php at line 134

setName

public void setName(string name)

Set the attribute name.

Parameters:
name - The attribute name.

\store\model\catalog\ZMAttribute.php at line 127

setProductId

public void setProductId(int productId)

Set the product id.

Parameters:
productId - The product id.

\store\model\catalog\ZMAttribute.php at line 148

setSortOrder

public void setSortOrder(int sortOrder)

Set the attribute sort order.

Parameters:
sortOrder - The attribute sort order.

\store\model\catalog\ZMAttribute.php at line 141

setType

public string setType(mixed type)

Set the attribute type.

Returns:
The attribute type.

ZenMagick 0.9.8