$components
$components : array
Required components
Abstract class for implementing a QuesttypeController.
$log : \nre\core\Logger
Logger instance
$linker : \nre\core\Linker
Linker instance
$agent : \nre\core\Agent
Corresponding Agent
$view : \nre\core\View
View of the Controller
$request : \nre\core\Request
Current request
$response : \nre\core\Response
Current response
__construct(string $layoutName, string $action, \hhu\z\controllers\Agent $agent)
Construct a new application Controller.
string | $layoutName | Name of the current Layout |
string | $action | Current Action |
\hhu\z\controllers\Agent | $agent | Corresponding Agent |
preFilter(\nre\core\Request $request, \nre\core\Response $response)
Prefilter that is executed before running the Controller.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
postFilter(\nre\core\Request $request, \nre\core\Response $response)
Prefilter that is executed after running the Controller.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
factory(string $controllerName, string $layoutName, string $action, \nre\core\Agent $agent)
Instantiate a QuesttypeController (Factory Pattern).
string | $controllerName | Name of the QuesttypeController to instantiate |
string | $layoutName | Name of the current Layout |
string | $action | Current Action |
\nre\core\Agent | $agent | Corresponding Agent |
run(\nre\core\Request $request, \nre\core\Response $response)
Run the Controller.
This method executes the Action of the Controller defined by the current Request.
\nre\core\Request | $request | Current request |
\nre\core\Response | $response | Current response |
saveAnswersOfCharacter(array $seminary, array $questgroup, array $quest, array $character, array $answers)
Save the answers of a Character for a Quest.
array | $seminary | Current Seminary data |
array | $questgroup | Current Questgroup data |
array | $quest | Current Quest data |
array | $character | Current Character data |
array | $answers | Character answers for the Quest |
saveDataForCharacterAnswers(array $seminary, array $questgroup, array $quest, array $character, array $data)
Save additional data for the answers of a Character for a Quest.
array | $seminary | Current Seminary data |
array | $questgroup | Current Questgroup data |
array | $quest | Current Quest data |
array | $character | Current Character data |
array | $data | Additional (POST-) data |
matchAnswersOfCharacter(array $seminary, array $questgroup, array $quest, array $character, array $answers) : boolean
Check if answers of a Character for a Quest match the correct ones.
array | $seminary | Current Seminary data |
array | $questgroup | Current Questgroup data |
array | $quest | Current Quest data |
array | $character | Current Character data |
array | $answers | Character answers for the Quest |
True/false for a right/wrong answer or null for moderator evaluation
quest(array $seminary, array $questgroup, array $quest, array $character, \Exception $exception)
Action: quest.
Show the task of a Quest.
array | $seminary | Current Seminary data |
array | $questgroup | Current Questgroup data |
array | $quest | Current Quest data |
array | $character | Current Character data |
\Exception | $exception | Character submission exception |
submission(array $seminary, array $questgroup, array $quest, array $character)
Action: submission.
Show the submission of a Character for a Quest.
array | $seminary | Current Seminary data |
array | $questgroup | Current Questgroup data |
array | $quest | Current Quest data |
array | $character | Current Character data |
getView() : \nre\core\View
Get the View of the Controller
View of the Controller
loadModels()
Load the Models of this Controller.