ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Whoops\Handler\SoapResponseHandler Class Reference

Catches an exception and converts it to an Soap XML response. More...

+ Inheritance diagram for Whoops\Handler\SoapResponseHandler:
+ Collaboration diagram for Whoops\Handler\SoapResponseHandler:

Public Member Functions

 handle ()
 
- Public Member Functions inherited from Whoops\Handler\Handler
 setRun (Run $run)
 
 setInspector (Inspector $inspector)
 
 setException (Exception $exception)
 

Private Member Functions

 toXml (\Exception $exception)
 Converts a Exception into a SoapFault XML. More...
 

Additional Inherited Members

- Data Fields inherited from Whoops\Handler\Handler
const DONE = 0x10
 Return constants that can be returned from Handler::handle to message the handler walker. More...
 
const LAST_HANDLER = 0x20
 
const QUIT = 0x30
 
- Protected Member Functions inherited from Whoops\Handler\Handler
 getRun ()
 
 getInspector ()
 
 getException ()
 

Detailed Description

Catches an exception and converts it to an Soap XML response.

Author
Markus Staab http://github.com/staabm

Definition at line 16 of file SoapResponseHandler.php.

Member Function Documentation

◆ handle()

Whoops\Handler\SoapResponseHandler::handle ( )
Returns
int

Implements Whoops\Handler\HandlerInterface.

Definition at line 21 of file SoapResponseHandler.php.

References Whoops\Handler\Handler\$exception, Whoops\Handler\Handler\getException(), Whoops\Handler\Handler\QUIT, and Whoops\Handler\SoapResponseHandler\toXml().

22  {
23  $exception = $this->getException();
24 
25  echo $this->toXml($exception);
26 
27  return Handler::QUIT;
28  }
toXml(\Exception $exception)
Converts a Exception into a SoapFault XML.
+ Here is the call graph for this function:

◆ toXml()

Whoops\Handler\SoapResponseHandler::toXml ( \Exception  $exception)
private

Converts a Exception into a SoapFault XML.

Definition at line 33 of file SoapResponseHandler.php.

Referenced by Whoops\Handler\SoapResponseHandler\handle().

34  {
35  $xml = '';
36  $xml .= '<?xml version="1.0" encoding="UTF-8"?>';
37  $xml .= '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">';
38  $xml .= ' <SOAP-ENV:Body>';
39  $xml .= ' <SOAP-ENV:Fault>';
40  $xml .= ' <faultcode>'. htmlspecialchars($exception->getCode()) .'</faultcode>';
41  $xml .= ' <faultstring>'. htmlspecialchars($exception->getMessage()) .'</faultstring>';
42  $xml .= ' <detail><trace>'. htmlspecialchars($exception->getTraceAsString()) .'</trace></detail>';
43  $xml .= ' </SOAP-ENV:Fault>';
44  $xml .= ' </SOAP-ENV:Body>';
45  $xml .= '</SOAP-ENV:Envelope>';
46 
47  return $xml;
48  }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: