STAGE_LOAD
STAGE_LOAD
Stage: Load
Agent to display a toplevel error page.
$controller : \nre\core\Controller
Controller of this Agent
$log : \nre\core\Logger
Log-system
$request : \nre\core\Request
Current request
$response : \nre\core\Response
Current response
$intermediateAgent : \nre\agents\IntermediateAgent
IntermediateAgent instance
run(\nre\core\Request $request, \nre\core\Response $response) : \Exception
Run the Controller of this Agent and its SubAgents.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
Last occurred exception of SubAgents
getIntermediateAgent() : \nre\agents\IntermediateAgent
Return the IntermediateAgent.
IntermediateAgent
factory(string $agentName, \nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log = null)
Instantiate an Agent (Factory Pattern).
string | $agentName | Name of the Agent to instantiate |
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | |
\nre\core\Logger | $log | Log-system |
index(\nre\core\Request $request, \nre\core\Response $response)
Action: index.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
__construct(\nre\core\Request $request, \nre\core\Response $response, \nre\core\Logger $log = null)
Construct a new Agent.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | |
\nre\core\Logger | $log | Log-system |
loadController()
Load the Controller of this Agent.
_run(\nre\core\Request $request, \nre\core\Response $response) : \Exception
Run the Controller of this Agent and its SubAgents.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
Last occurred exception of SubAgents
error(\Exception $exception, integer $httpStatusCode, string $stage = self::STAGE_LOAD)
Handle an error that occurred during loading/cnostructing/running of the IntermediateAgent.
\Exception | $exception | Occurred exception |
integer | $httpStatusCode | HTTP-statuscode |
string | $stage | Stage of execution |
errorInline(array $subAgent, \nre\core\Request $request, \nre\core\Excepiton $exception) : array
Handle the exception of a SubAgent.
array | $subAgent | Original (Sub-) Agent |
\nre\core\Request | $request | Current request |
\nre\core\Excepiton | $exception | Occurred exception |
InlineError-SubAgent