ZenMagick 0.9.10


zenmagick.store.shared.model.catalog\ZMAttribute
model\catalog\ZMAttribute.php at line 33

Class ZMAttribute

ZMObject
└─ZMAttribute

public class ZMAttribute
extends ZMObject

A single attribute.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct(int id, string name, string type)

Create new attribute.

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
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

model\catalog\ZMAttribute.php at line 49

__construct

public void __construct(int id, string name, string type)

Create new attribute.

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

model\catalog\ZMAttribute.php at line 161

addValue

public void addValue(ZMAttributeValue value)

Add an attribute value.

Parameters:
value - A ZMAttributeValue.

model\catalog\ZMAttribute.php at line 166

clearValues

public void clearValues()

Clear all values.


model\catalog\ZMAttribute.php at line 105

getComment

public string getComment()

Get the attribute comment.

Returns:
The attribute comment.

model\catalog\ZMAttribute.php at line 70

getId

public int getId()

Get the attribute id.

Returns:
The attribute id.

model\catalog\ZMAttribute.php at line 84

getName

public string getName()

Get the attribute name.

Returns:
The attribute name.

model\catalog\ZMAttribute.php at line 77

getProductId

public int getProductId()

Get the product id.

Returns:
The product id.

model\catalog\ZMAttribute.php at line 98

getSortOrder

public int getSortOrder()

Get the attribute sort order.

Returns:
The attribute sort order.

model\catalog\ZMAttribute.php at line 91

getType

public string getType()

Get the attribute type.

Returns:
The attribute type.

model\catalog\ZMAttribute.php at line 112

getValues

public array getValues()

Get the attribute values.

Returns:
A list of ZMAttributeValue objects.

model\catalog\ZMAttribute.php at line 175

removeValue

public void removeValue(mixed value)

Remove an attribute value.

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

model\catalog\ZMAttribute.php at line 154

setComment

public void setComment(string comment)

Set the attribute comment.

Parameters:
comment - The attribute comment.

model\catalog\ZMAttribute.php at line 119

setId

public void setId(int id)

Set the attribute id.

Parameters:
id - The attribute id.

model\catalog\ZMAttribute.php at line 133

setName

public void setName(string name)

Set the attribute name.

Parameters:
name - The attribute name.

model\catalog\ZMAttribute.php at line 126

setProductId

public void setProductId(int productId)

Set the product id.

Parameters:
productId - The product id.

model\catalog\ZMAttribute.php at line 147

setSortOrder

public void setSortOrder(int sortOrder)

Set the attribute sort order.

Parameters:
sortOrder - The attribute sort order.

model\catalog\ZMAttribute.php at line 140

setType

public string setType(mixed type)

Set the attribute type.

Returns:
The attribute type.

ZenMagick 0.9.10