src/LdapTools/LdapManager.php
public function getConnection($domain = null)
    {
        $domain = $domain ?: $this->context;
        $this->validateDomainName($domain);

        if (!$this->connections[$domain]) {
            $this->connections[$domain] = new LdapConnection(
                $this->domains[$domain],
                $this->config->getEventDispatcher(),
                $this->config->getLogger(),
                $this->getCache()
            );
        }

        return $this->connections[$domain];
    }
public function getConnection($domain = null)
    {
        $domain = $domain ?: $this->context;
        $this->validateDomainName($domain);

        if (!$this->connections[$domain]) {
            $this->connections[$domain] = new LdapConnection(
                $this->domains[$domain],
                $this->config->getEventDispatcher(),
                $this->config->getLogger(),
                $this->getCache()
            );
        }

        return $this->connections[$domain];
    }
public function getConnection ( $ domain = null ) { $ domain = $ domain ? : $ this -> context ; $ this -> validateDomainName ( $ domain ) ; if ( ! $ this -> connections [ $ domain ] ) { $ this -> connections [ $ domain ] = new LdapConnection ( $ this -> domains [ $ domain ] , $ this -> config -> getEventDispatcher ( ) , $ this -> config -> getLogger ( ) , $ this -> getCache ( ) ) ; } return $ this -> connections [ $ domain ] ; }
Get the Ldap Connection object. By default it will get the connection of the domain currently in context. To get
a different domain connection pass the domain name as a parameter.

@param null|string $domain
@return Connection\LdapConnectionInterface
Get the Ldap Connection object . By default it will get the connection of the domain currently in context . To get a different domain connection pass the domain name as a parameter .