src/Connections/Ldap.php
public function connect($hostname, $port = '389')
    {
        $protocol = $this::PROTOCOL;

        if ($this->isUsingSSL()) {
            $protocol = $this::PROTOCOL_SSL;
        }

        return $this->connection = ldap_connect($protocol.$hostname, $port);
    }
public function connect($hostname, $port = '389')
    {
        $protocol = $this::PROTOCOL;

        if ($this->isUsingSSL()) {
            $protocol = $this::PROTOCOL_SSL;
        }

        return $this->connection = ldap_connect($protocol.$hostname, $port);
    }
public function connect ( $ hostname , $ port = '389' ) { $ protocol = $ this :: PROTOCOL ; if ( $ this -> isUsingSSL ( ) ) { $ protocol = $ this :: PROTOCOL_SSL ; } return $ this -> connection = ldap_connect ( $ protocol . $ hostname , $ port ) ; }
Connects to the specified hostname
using the PHP ldap protocol.

@param string $hostname
@param string $port

@return resource
Connects to the specified hostname using the PHP ldap protocol .