1: <?php
2: /**
3: * A grouped query element.
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: * A grouped query element.
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: abstract class Horde_Kolab_Server_Query_Element_Group
29: implements Horde_Kolab_Server_Query_Element_Interface
30: {
31: /**
32: * The group elements.
33: *
34: * @var array
35: */
36: protected $_elements;
37:
38: /**
39: * Constructor.
40: *
41: * @param array $elements The group elements.
42: */
43: public function __construct(array $elements)
44: {
45: $this->_elements = $elements;
46: }
47:
48: /**
49: * Return the query element name.
50: *
51: * This should never be called for group elements.
52: *
53: * @return string The name of the query element.
54: */
55: public function getName()
56: {
57: throw new Horde_Kolab_Server_Exception('Not supported!');
58: }
59:
60: /**
61: * Return the value of this element.
62: *
63: * This should never be called for group elements.
64: *
65: * @return mixed The query value.
66: */
67: public function getValue()
68: {
69: throw new Horde_Kolab_Server_Exception('Not supported!');
70: }
71:
72: /**
73: * Return the elements of this group.
74: *
75: * @return mixed The group elements.
76: */
77: public function getElements()
78: {
79: return $this->_elements;
80: }
81: }