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
1 changed files with 10 additions and 4 deletions

View File

@ -3,12 +3,13 @@
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\Logger;
use Icinga\Application\Platform;
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.
@ -24,7 +25,7 @@ use Icinga\Data\ConfigObject;
* ));
* </code>
*/
class Connection
class Connection implements Selectable
{
const LDAP_NO_SUCH_OBJECT = 32;
const LDAP_SIZELIMIT_EXCEEDED = 4;
@ -122,6 +123,11 @@ class Connection
return $this->root;
}
/**
* Provide a query on this connection
*
* @return Query
*/
public function select()
{
return new Query($this);