classes/phing/tasks/ext/HttpRequestTask.php
protected function processResponse(HTTP_Request2_Response $response)
    {
        if ($this->responseRegex !== '') {
            $this->regexp->setPattern($this->responseRegex);

            if (!$this->regexp->matches($response->getBody())) {
                throw new BuildException('The received response body did not match the given regular expression');
            } else {
                $this->log('The response body matched the provided regex.');
            }
        }

        if ($this->responseCodeRegex !== '') {
            $this->regexp->setPattern($this->responseCodeRegex);

            if (!$this->regexp->matches($response->getStatus())) {
                throw new BuildException('The received response status-code did not match the given regular expression');
            } else {
                $this->log('The response status-code matched the provided regex.');
            }
        }
    }
protected function processResponse(HTTP_Request2_Response $response)
    {
        if ($this->responseRegex !== '') {
            $this->regexp->setPattern($this->responseRegex);

            if (!$this->regexp->matches($response->getBody())) {
                throw new BuildException('The received response body did not match the given regular expression');
            } else {
                $this->log('The response body matched the provided regex.');
            }
        }

        if ($this->responseCodeRegex !== '') {
            $this->regexp->setPattern($this->responseCodeRegex);

            if (!$this->regexp->matches($response->getStatus())) {
                throw new BuildException('The received response status-code did not match the given regular expression');
            } else {
                $this->log('The response status-code matched the provided regex.');
            }
        }
    }
protected function processResponse ( HTTP_Request2_Response $ response ) { if ( $ this -> responseRegex !== '' ) { $ this -> regexp -> setPattern ( $ this -> responseRegex ) ; if ( ! $ this -> regexp -> matches ( $ response -> getBody ( ) ) ) { throw new BuildException ( 'The received response body did not match the given regular expression' ) ; } else { $ this -> log ( 'The response body matched the provided regex.' ) ; } } if ( $ this -> responseCodeRegex !== '' ) { $ this -> regexp -> setPattern ( $ this -> responseCodeRegex ) ; if ( ! $ this -> regexp -> matches ( $ response -> getStatus ( ) ) ) { throw new BuildException ( 'The received response status-code did not match the given regular expression' ) ; } else { $ this -> log ( 'The response status-code matched the provided regex.' ) ; } } }
Checks whether response body or status-code matches the given regexp

@param  HTTP_Request2_Response $response
@return void
@throws BuildException
@throws HTTP_Request2_Exception
@throws RegexpException
Checks whether response body or status - code matches the given regexp