protected function prepareConnection()
    {
        if ($this->configuration->get('use_ssl')) {
            $this->connection->ssl();
        } elseif ($this->configuration->get('use_tls')) {
            $this->connection->tls();
        }

        $options = array_replace(
            $this->configuration->get('custom_options'),
            [
                LDAP_OPT_PROTOCOL_VERSION => $this->configuration->get('version'),
                LDAP_OPT_NETWORK_TIMEOUT => $this->configuration->get('timeout'),
                LDAP_OPT_REFERRALS => $this->configuration->get('follow_referrals')
            ]
        );

        $this->connection->setOptions($options);
    }
protected function prepareConnection()
    {
        if ($this->configuration->get('use_ssl')) {
            $this->connection->ssl();
        } elseif ($this->configuration->get('use_tls')) {
            $this->connection->tls();
        }

        $options = array_replace(
            $this->configuration->get('custom_options'),
            [
                LDAP_OPT_PROTOCOL_VERSION => $this->configuration->get('version'),
                LDAP_OPT_NETWORK_TIMEOUT => $this->configuration->get('timeout'),
                LDAP_OPT_REFERRALS => $this->configuration->get('follow_referrals')
            ]
        );

        $this->connection->setOptions($options);
    }
protected function prepareConnection ( ) { if ( $ this -> configuration -> get ( 'use_ssl' ) ) { $ this -> connection -> ssl ( ) ; } elseif ( $ this -> configuration -> get ( 'use_tls' ) ) { $ this -> connection -> tls ( ) ; } $ options = array_replace ( $ this -> configuration -> get ( 'custom_options' ) , [ LDAP_OPT_PROTOCOL_VERSION => $ this -> configuration -> get ( 'version' ) , LDAP_OPT_NETWORK_TIMEOUT => $ this -> configuration -> get ( 'timeout' ) , LDAP_OPT_REFERRALS => $ this -> configuration -> get ( 'follow_referrals' ) ] ) ; $ this -> connection -> setOptions ( $ options ) ; }
Prepares the connection by setting configured parameters.

@return void

@throws \Adldap\Configuration\ConfigurationException When configuration options requested do not exist
Prepares the connection by setting configured parameters .