public function login($username = 'anonymous', $password = '')
    {
        $result = $this->ftp->login($username, $password);

        if ($result === false) {
            throw new FtpException('Login incorrect');
        }

        return $this;
    }
public function login($username = 'anonymous', $password = '')
    {
        $result = $this->ftp->login($username, $password);

        if ($result === false) {
            throw new FtpException('Login incorrect');
        }

        return $this;
    }
public function login ( $ username = 'anonymous' , $ password = '' ) { $ result = $ this -> ftp -> login ( $ username , $ password ) ; if ( $ result === false ) { throw new FtpException ( 'Login incorrect' ) ; } return $ this ; }
Logs in to an FTP connection.

@param string $username
@param string $password

@return FtpClient
@throws FtpException If the login is incorrect
Logs in to an FTP connection .