AbstractController
abstract class AbstractController (View source)
Methods
void
render(string $templatePath, array $templateData = [])
No description
void
addScriptFiles(array $files)
No description
bool
hasDatabase()
No description
void
redirect(string $route, array $params = [])
No description
void
checkParameters(array $params, bool $request = false)
Function added to avoid path disclosures.
void
sendErrorResponse(string $message, int $statusCode = 400)
No description
Details
__construct(ResponseRenderer $response, Template $template)
No description
protected void
render(string $templatePath, array $templateData = [])
No description
protected void
addScriptFiles(array $files)
No description
protected bool
hasDatabase()
No description
protected void
redirect(string $route, array $params = [])
No description
protected void
checkParameters(array $params, bool $request = false)
Function added to avoid path disclosures.
Called by each script that needs parameters, it displays an error message and, by default, stops the execution.
protected void
sendErrorResponse(string $message, int $statusCode = 400)
No description