\Whoops\HandlerXmlResponseHandler

Catches an exception and converts it to an XML response. Additionally can also return exception frames for consumption by an API.

Summary

Methods
Properties
Constants
setRun()
setInspector()
setException()
addTraceToOutput()
handle()
contentType()
No public properties found
DONE
LAST_HANDLER
QUIT
getRun()
getInspector()
getException()
No protected properties found
N/A
addDataToNode()
toXml()
$run
$inspector
$exception
$returnFrames
N/A

Constants

DONE

DONE = 16

LAST_HANDLER

LAST_HANDLER = 32

The Handler has handled the Throwable in some way, and wishes to skip any other Handler.

Execution will continue.

QUIT

QUIT = 48

The Handler has handled the Throwable in some way, and wishes to quit/stop execution

Properties

$exception

$exception : \Throwable

Type

\Throwable

$returnFrames

$returnFrames : boolean

Type

boolean

Methods

setException()

setException(\Throwable  $exception) : void

Parameters

\Throwable $exception

addTraceToOutput()

addTraceToOutput(boolean|null  $returnFrames = null) : boolean|$this

Parameters

boolean|null $returnFrames

Returns

boolean|$this

handle()

handle() : integer

Returns

integer

contentType()

contentType() : string

Returns

string

getException()

getException() : \Throwable

Returns

\Throwable

addDataToNode()

addDataToNode(\SimpleXMLElement  $node, array|\Traversable  $data) : \SimpleXMLElement

Parameters

\SimpleXMLElement $node

Node to append data to, will be modified in place

array|\Traversable $data

Returns

\SimpleXMLElement —

The modified node, for chaining

toXml()

toXml(array|\Traversable  $data) : string

The main function for converting to an XML document.

Parameters

array|\Traversable $data

Returns

string —

XML