1: <?php
2: /**
3: * The interface representing Kolab object attributes.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Server
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://pear.horde.org/index.php?package=Kolab_Server
12: */
13:
14: /**
15: * The interface representing Kolab object attributes.
16: *
17: * Copyright 2008-2012 Horde LLC (http://www.horde.org/)
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you
20: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
21: *
22: * @category Kolab
23: * @package Kolab_Server
24: * @author Gunnar Wrobel <wrobel@pardus.de>
25: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26: * @link http://pear.horde.org/index.php?package=Kolab_Server
27: */
28: interface Horde_Kolab_Server_Object_Attribute_Interface
29: {
30: /**
31: * Return the value of this attribute.
32: *
33: * @return array The value(s) of this attribute.
34: *
35: * @throws Horde_Kolab_Server_Exception If retrieval of the value failed.
36: */
37: public function value();
38:
39: /**
40: * Return the new internal state for this attribute.
41: *
42: * @param array $changes The object data that should be updated.
43: *
44: * @return array The resulting internal state.
45: *
46: * @throws Horde_Kolab_Server_Exception If storing the value failed.
47: */
48: public function update(array $changes);
49:
50: /**
51: * Return the internal attribute adapter.
52: *
53: * @return Horde_Kolab_Server_Structure_Attribute_Interface The internal
54: */
55: public function getAttribute();
56:
57: /**
58: * Return the name of this attribute.
59: *
60: * @return string The name of this attribute.
61: */
62: public function getName();
63:
64: /**
65: * Return if this attribute is undefined in the given data array.
66: *
67: * @param array $changes The data array to test.
68: *
69: * @return string The name of this object.
70: */
71: public function isEmpty(array $changes);
72: }