LdapTools\Query\LdapQueryBuilder::setBaseDn PHP Method

setBaseDn() public method

Sets the base DN for the query.
public setBaseDn ( string $baseDn )
$baseDn string
    public function setBaseDn($baseDn)
    {
        $this->operation->setBaseDn($baseDn);
        return $this;
    }

Usage Example

 function it_should_be_able_to_set_the_ldap_search_base_when_searching_for_the_user()
 {
     $searchBase = 'ou=employees,dc=foo,dc=bar';
     $this->setSearchBase($searchBase);
     $this->qb->setBaseDn($searchBase)->shouldBeCalled()->willReturn($this->qb);
     $this->loadUserByUsername('foo');
 }