Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Inheritance: extends Horde_Kolab_Server_Query_Element_Group
コード例 #1
0
ファイル: Ldap.php プロジェクト: jubinpatel/horde
 /**
  * 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);
     }
 }
コード例 #2
0
ファイル: ElementTest.php プロジェクト: jubinpatel/horde
 public function testClassNotMethodConvertHasResultMixedTheConvertedElement()
 {
     $this->writer->expects($this->exactly(1))->method('convertNot')->will($this->returnValue('converted'));
     $less = new Horde_Kolab_Server_Query_Element_Less('', '');
     $not = new Horde_Kolab_Server_Query_Element_Not($less);
     $this->assertEquals('converted', $not->convert($this->writer));
 }