\Horde_Kolab_Server_Object_Attribute_Default

A decorator to represent an object attribute with a default.

Copyright 2008-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
value()
update()
getAttribute()
getName()
isEmpty()
No public properties found
No constants found
No protected methods found
$_attribute
N/A
No private methods found
$_default
N/A

Properties

$_attribute

$_attribute : 

The decorated attribute.

Type

$_default

$_default : 

The default value for the attribute.

Type

Methods

__construct()

__construct(\Horde_Kolab_Server_Object_Attribute  $attribute, mixed  $default) 

Constructor

Parameters

\Horde_Kolab_Server_Object_Attribute $attribute

The decorated attribute.

mixed $default

The default value.

value()

value() : array

Return the value of this attribute.

Returns

array —

The value(s) of this attribute.

update()

update(array  $changes) : array

Return the new internal state for this attribute.

Parameters

array $changes

The object data that should be updated.

Throws

\Horde_Kolab_Server_Exception

If storing the value failed.

Returns

array —

The resulting internal state.

getName()

getName() : string

Return the name of this attribute.

Returns

string —

The name of this attribute.

isEmpty()

isEmpty(array  $changes) : string

Return if this attribute is undefined in the given data array.

Parameters

array $changes

The data array to test.

Returns

string —

The name of this object.