LdapTools\Operation\QueryOperation::setBaseDn PHP Method

setBaseDn() public method

Set the base DN for the LDAP query operation.
public setBaseDn ( string $baseDn )
$baseDn string
    public function setBaseDn($baseDn)
    {
        $this->properties['baseDn'] = $baseDn;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 function it_should_resolve_base_dn_parameters_when_querying_ldap($connection)
 {
     $schema = new LdapObjectSchema('ad', 'user');
     $schema->setBaseDn('%_configurationnamingcontext_%');
     $schema->setFilter(new Comparison('foo', '=', 'bar'));
     $this->operation->getFilter()->addLdapObjectSchema($schema);
     $this->operation->setBaseDn('%_configurationnamingcontext_%');
     $connection->execute(Argument::that(function ($op) {
         return $op->getBaseDn() == 'cn=Configuration,dc=example,dc=local';
     }))->willReturn($this->ldapEntries);
     $this->execute();
 }
All Usage Examples Of LdapTools\Operation\QueryOperation::setBaseDn