src/Autodiscover.php
protected function parseAutodiscoverResponse()
    {
        // Content-type isn't trustworthy, unfortunately. Shame on Microsoft.
        if (substr($this->last_response, 0, 5) !== '<?xml') {
            return false;
        }

        $response = $this->responseToArray($this->last_response);

        if (isset($response['Error'])) {
            $this->error = $response['Error'];
            return false;
        }

        // Check the account action for redirect.
        switch ($response['Account']['Action']) {
            case 'redirectUrl':
                $this->redirect = array(
                    'redirectUrl' => $response['Account']['RedirectUrl']
                );
                return false;
            case 'redirectAddr':
                $this->redirect = array(
                    'redirectAddr' => $response['Account']['RedirectAddr']
                );
                return false;
            case 'settings':
            default:
                $this->discovered = $response;
                return true;
        }
    }
protected function parseAutodiscoverResponse()
    {
        // Content-type isn't trustworthy, unfortunately. Shame on Microsoft.
        if (substr($this->last_response, 0, 5) !== '<?xml') {
            return false;
        }

        $response = $this->responseToArray($this->last_response);

        if (isset($response['Error'])) {
            $this->error = $response['Error'];
            return false;
        }

        // Check the account action for redirect.
        switch ($response['Account']['Action']) {
            case 'redirectUrl':
                $this->redirect = array(
                    'redirectUrl' => $response['Account']['RedirectUrl']
                );
                return false;
            case 'redirectAddr':
                $this->redirect = array(
                    'redirectAddr' => $response['Account']['RedirectAddr']
                );
                return false;
            case 'settings':
            default:
                $this->discovered = $response;
                return true;
        }
    }
protected function parseAutodiscoverResponse ( ) { // Content-type isn't trustworthy, unfortunately. Shame on Microsoft. if ( substr ( $ this -> last_response , 0 , 5 ) !== '<?xml' ) { return false ; } $ response = $ this -> responseToArray ( $ this -> last_response ) ; if ( isset ( $ response [ 'Error' ] ) ) { $ this -> error = $ response [ 'Error' ] ; return false ; } // Check the account action for redirect. switch ( $ response [ 'Account' ] [ 'Action' ] ) { case 'redirectUrl' : $ this -> redirect = array ( 'redirectUrl' => $ response [ 'Account' ] [ 'RedirectUrl' ] ) ; return false ; case 'redirectAddr' : $ this -> redirect = array ( 'redirectAddr' => $ response [ 'Account' ] [ 'RedirectAddr' ] ) ; return false ; case 'settings' : default : $ this -> discovered = $ response ; return true ; } }
Parse the Autoresponse Payload, particularly to determine if an
additional request is necessary.

@return boolean|array FALSE if response isn't XML or parsed response
array.
Parse the Autoresponse Payload particularly to determine if an additional request is necessary .