INLINEERROR_AGENT
INLINEERROR_AGENT
Name of BottomlevelAgent for showing inline errors
The ToplevelAgent assumes the task of a FrontController. There is only one per request.
$controller : \nre\core\Controller
Controller of this Agent
$log : \nre\core\Logger
Log-system
$intermediateAgent : \nre\agents\IntermediateAgent
IntermediateAgent instance
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 |
run(\nre\agents\Request $request, \nre\agents\Response $response) : \nre\agents\Exception
Run the Controller of this Agent and its SubAgents.
| \nre\agents\Request | $request | Current request |
| \nre\agents\Response | $response | Current response |
Last occurred exception of SubAgents
getIntermediateAgent() : \nre\agents\IntermediateAgent
Return the IntermediateAgent.
IntermediateAgent
__construct(\nre\agents\Request $request, \nre\core\Response $response, \nre\agents\Logger $log = null)
Construct a ToplevelAgent.
| \nre\agents\Request | $request | Current request |
| \nre\core\Response | $response | |
| \nre\agents\Logger | $log | Log-system |
loadController()
Load the Controller of this Agent.
log(\nre\core\Exception $exception, integer $logMode)
Log an error.
| \nre\core\Exception | $exception | Occurred exception |
| integer | $logMode | Log mode |
newInlineError(string $label, \nre\core\Exception $exception)
Create a new InlineError.
| string | $label | Name of the original Agent |
| \nre\core\Exception | $exception | Occurred exception |
_run(\nre\agents\Request $request, \nre\agents\Response $response) : \nre\agents\Exception
Run the Controller of this Agent and its SubAgents.
| \nre\agents\Request | $request | Current request |
| \nre\agents\Response | $response | Current response |
Last occurred exception of SubAgents
error(\nre\agents\Exception $exception, integer $httpStatusCode, string $stage = self::STAGE_LOAD)
Handle an error that occurred during loading/cnostructing/running of the IntermediateAgent.
| \nre\agents\Exception | $exception | Occurred exception |
| integer | $httpStatusCode | HTTP-statuscode |
| string | $stage | Stage of execution |