src/Web/Communicator.php
protected function raiseHtmlReceivedError($response)
    {
        libxml_use_internal_errors(true);
        $doc = new DOMDocument('1.0', 'utf-8');
        $doc->loadHTML($response);
        $body = $doc->getElementsByTagName('body');
        if ($body->length > 0) {
            $body = $body->item(0)->textContent;
        } else {
            $body = '';
        }
        throw new RuntimeException("HTML response received: $body", 702);
    }
protected function raiseHtmlReceivedError($response)
    {
        libxml_use_internal_errors(true);
        $doc = new DOMDocument('1.0', 'utf-8');
        $doc->loadHTML($response);
        $body = $doc->getElementsByTagName('body');
        if ($body->length > 0) {
            $body = $body->item(0)->textContent;
        } else {
            $body = '';
        }
        throw new RuntimeException("HTML response received: $body", 702);
    }
protected function raiseHtmlReceivedError ( $ response ) { libxml_use_internal_errors ( true ) ; $ doc = new DOMDocument ( '1.0' , 'utf-8' ) ; $ doc -> loadHTML ( $ response ) ; $ body = $ doc -> getElementsByTagName ( 'body' ) ; if ( $ body -> length > 0 ) { $ body = $ body -> item ( 0 ) -> textContent ; } else { $ body = '' ; } throw new RuntimeException ( "HTML response received: $body" , 702 ) ; }
Returns an error message containing the received HTML.

@param string $response
String containing an html document.

@trows \RuntimeException
Returns an error message containing the received HTML .