LdapTools\Connection\LdapConnection::connect PHP 메소드

connect() 공개 메소드

public connect ( $username = null, $password = null, $anonymous = false, $server = null )
    public function connect($username = null, $password = null, $anonymous = false, $server = null)
    {
        $this->initiateLdapConnection($server);
        $username = $this->usernameFormatter->getUsername($username ?: $this->config->getUsername());
        $password = $password ?: $this->config->getPassword();
        $this->bind($username, $password, $anonymous);
        $this->lastActivity = new \DateTime();
        return $this;
    }