\nre\apisWebApi

WebApi-implementation.

This class runs and renders an web-applictaion.

Summary

Methods
Properties
Constants
__construct()
run()
render()
No public properties found
No constants found
log()
$request
$response
$log
N/A
loadToplevelAgent()
addRoutes()
error()
errorService()
$toplevelAgent
N/A

Properties

$toplevelAgent

$toplevelAgent : \nre\core\ToplevelAgent

Der Toplevelagent

Type

\nre\core\ToplevelAgent

Methods

__construct()

__construct() 

Construct a new WebApi.

run()

run() : \nre\core\Exception

Run application.

This method runs the application and handles all errors.

Returns

\nre\core\Exception

Last occurred exception of an subagent

render()

render() 

Render output.

log()

log(\nre\core\Exception  $exception, integer  $logMode) 

Log an exception

Parameters

\nre\core\Exception $exception

Occurred exception

integer $logMode

Log-mode

loadToplevelAgent()

loadToplevelAgent() 

Load the ToplevelAgent specified by the request.

Throws

\nre\core\ServiceUnavailableException
\nre\core\AgentNotValidException
\nre\core\AgentNotFoundException

addRoutes()

addRoutes() 

Add routes (normal and reverse) defined in the AppConfig.

error()

error(\nre\apis\Exception  $exception, integer  $httpStatusCode) 

Handle an error that orrcurred during the loading/constructing/running of the ToplevelAgent.

Parameters

\nre\apis\Exception $exception

Occurred exception

integer $httpStatusCode

HTTP-statuscode

errorService()

errorService(  $exception) 

Handle a error which cannot be handles by the system (and HTTP 503).

$param Exception $exception Occurred exception

Parameters

$exception