1: <?php
2: /**
3: * The base class representing Kolab objects stored in the server
4: * database.
5: *
6: * PHP version 5
7: *
8: * @category Kolab
9: * @package Kolab_Server
10: * @author Gunnar Wrobel <wrobel@pardus.de>
11: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
12: * @link http://pear.horde.org/index.php?package=Kolab_Server
13: */
14:
15: /**
16: * This class provides methods to deal with Kolab objects stored in
17: * the Kolab db.
18: *
19: * Copyright 2008-2012 Horde LLC (http://www.horde.org/)
20: *
21: * See the enclosed file COPYING for license information (LGPL). If you
22: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
23: *
24: * @category Kolab
25: * @package Kolab_Server
26: * @author Gunnar Wrobel <wrobel@pardus.de>
27: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
28: * @link http://pear.horde.org/index.php?package=Kolab_Server
29: */
30: abstract class Horde_Kolab_Server_Object_Top
31: extends Horde_Kolab_Server_Object_Base
32: implements Horde_Kolab_Server_Object_Searches
33: {
34: /** Define the possible Kolab object classes */
35: const OBJECTCLASS_TOP = 'top';
36:
37: /**
38: * The attributes defined for this class.
39: *
40: * @var array
41: */
42: static public $attributes = array(
43: 'objectClass', 'Openldapaci', 'Guid', 'Id',
44: 'Createtimestamp', 'Modifytimestamp',
45: 'Createtimestampdate', 'Modifytimestampdate',
46: );
47:
48: static public $object_classes = array(
49: self::OBJECTCLASS_TOP,
50: );
51:
52: /**
53: * Sort by this attributes.
54: *
55: * @var string
56: */
57: public $sort_by = 'Guid';
58:
59: /**
60: * Return the filter string to retrieve this object type.
61: *
62: * @static
63: *
64: * @return string The filter to retrieve this object type from the server
65: * database.
66: */
67: public static function getFilter()
68: {
69: return new Horde_Kolab_Server_Query_Element_Equals(
70: Horde_Kolab_Server_Object_Attribute_Objectclass::NAME,
71: self::OBJECTCLASS_TOP
72: );
73: }
74:
75: /**
76: * Distill the server side object information to save.
77: *
78: * @param array &$info The information about the object.
79: *
80: * @return NULL.
81: *
82: * @throws Horde_Kolab_Server_Exception If the given information contains errors.
83: */
84: public function prepareObjectInformation(array &$info)
85: {
86: }
87:
88: /**
89: * Returns the set of actions supported by this object type.
90: *
91: * @return array An array of supported actions.
92: */
93: public function getActions()
94: {
95: return array();
96: }
97: }
98: