interface ObjectInterface (View source)

The interface that any object thay may have attributes must implement.

Methods

getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)

No description

getAttributeValue(AttributeKeyInterface|string $ak)

Alias of getAttributeValueObject (assuming $createIfNotExists is false).

mixed
getAttribute(AttributeKeyInterface|string $ak, string|false $mode = false)

No description

clearAttribute(AttributeKeyInterface|string $ak)

No description

setAttribute(AttributeKeyInterface|string $ak, AbstractValue|EmptyRequestAttributeValue|array $value)

Sets the attribute of of the ObjectInterface instance to the specified value, and persists it.

Details

AttributeValueInterface|null getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)

No description

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

bool $createIfNotExists

Shall the generic attribute value be created if it does not already exist?

Return Value

AttributeValueInterface|null

AttributeValueInterface|null getAttributeValue(AttributeKeyInterface|string $ak)

Alias of getAttributeValueObject (assuming $createIfNotExists is false).

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

Return Value

AttributeValueInterface|null

mixed getAttribute(AttributeKeyInterface|string $ak, string|false $mode = false)

No description

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

string|false $mode

Return Value

mixed

CategoryInterface getObjectAttributeCategory()

No description

Return Value

CategoryInterface

clearAttribute(AttributeKeyInterface|string $ak)

No description

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

AttributeValueInterface setAttribute(AttributeKeyInterface|string $ak, AbstractValue|EmptyRequestAttributeValue|array $value)

Sets the attribute of of the ObjectInterface instance to the specified value, and persists it.

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

AbstractValue|EmptyRequestAttributeValue|array $value

Return Value

AttributeValueInterface