Ldap\Connection: Implement interface Selectable

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-04 11:15:20 +02:00
parent ecd059dec5
commit 7178026b8b

View File

@ -3,12 +3,13 @@
namespace Icinga\Protocol\Ldap; namespace Icinga\Protocol\Ldap;
use Icinga\Exception\ProgrammingError;
use Icinga\Protocol\Ldap\Exception as LdapException;
use Icinga\Application\Platform;
use Icinga\Application\Config; use Icinga\Application\Config;
use Icinga\Application\Logger; use Icinga\Application\Logger;
use Icinga\Application\Platform;
use Icinga\Data\ConfigObject; use Icinga\Data\ConfigObject;
use Icinga\Data\Selectable;
use Icinga\Exception\ProgrammingError;
use Icinga\Protocol\Ldap\Exception as LdapException;
/** /**
* Backend class managing all the LDAP stuff for you. * Backend class managing all the LDAP stuff for you.
@ -24,7 +25,7 @@ use Icinga\Data\ConfigObject;
* )); * ));
* </code> * </code>
*/ */
class Connection class Connection implements Selectable
{ {
const LDAP_NO_SUCH_OBJECT = 32; const LDAP_NO_SUCH_OBJECT = 32;
const LDAP_SIZELIMIT_EXCEEDED = 4; const LDAP_SIZELIMIT_EXCEEDED = 4;
@ -122,6 +123,11 @@ class Connection
return $this->root; return $this->root;
} }
/**
* Provide a query on this connection
*
* @return Query
*/
public function select() public function select()
{ {
return new Query($this); return new Query($this);