/** * Convert the not element to query format. * * @param Horde_Kolab_Server_Query_Element_Group $group The element to convert. * * @return mixed The query element in query format. * * @throws Horde_Kolab_Server_Exception If the query is malformed. */ public function convertNot(Horde_Kolab_Server_Query_Element_Not $not) { $elements = $not->getElements(); try { return Horde_Ldap_Filter::combine('!', $elements[0]->convert($this)); } catch (Horde_Ldap_Exception $e) { throw new Horde_Kolab_Server_Exception($e->getMessage(), Horde_Kolab_Server_Exception::INVALID_QUERY, $e); } }
public function testClassNotMethodConstructHasPostconditionThatTheElementWasSavedAsArray() { $less = new Horde_Kolab_Server_Query_Element_Less('', ''); $not = new Horde_Kolab_Server_Query_Element_Not($less); $this->assertInternalType('array', $not->getElements()); }