LdapTools\Resolver\BaseValueResolver::setLdapConnection PHP Method

setLdapConnection() public method

Set the LDAP connection for the current context.
public setLdapConnection ( LdapTools\Connection\LdapConnectionInterface $connection )
$connection LdapTools\Connection\LdapConnectionInterface
    public function setLdapConnection(LdapConnectionInterface $connection)
    {
        $this->connection = $connection;
    }

Usage Example

Beispiel #1
0
 /**
  * Retrieve the AttributeValueResolver instance with the connection and other information set if needed.
  *
  * @param BaseValueResolver $valueResolver
  * @param null|string $dn
  */
 protected function configureValueResolver(BaseValueResolver $valueResolver, $dn = null)
 {
     if ($this->connection) {
         $valueResolver->setLdapConnection($this->connection);
     }
     if (!is_null($dn)) {
         $valueResolver->setDn($dn);
     }
 }