final class ChartingDataController extends AbstractController (View source)

Properties

protected ResponseRenderer $response from  AbstractController
protected Template $template from  AbstractController
protected Data $data from  AbstractController

Methods

__construct(ResponseRenderer $response, Template $template, Data $data, Monitor $monitor, DatabaseInterface $dbi)

No description

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

void
__invoke()

No description

Details

__construct(ResponseRenderer $response, Template $template, Data $data, Monitor $monitor, DatabaseInterface $dbi)

No description

Parameters

ResponseRenderer $response
Template $template
Data $data
Monitor $monitor
DatabaseInterface $dbi

protected void render(string $templatePath, array $templateData = [])

No description

Parameters

string $templatePath
array $templateData

Return Value

void

protected void addScriptFiles(array $files)

No description

Parameters

array $files

Return Value

void

protected bool hasDatabase()

No description

Return Value

bool

protected void redirect(string $route, array $params = [])

No description

Parameters

string $route
array $params

Return Value

void

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.

Parameters

array $params
bool $request

Check parameters in request

Return Value

void

protected void sendErrorResponse(string $message, int $statusCode = 400)

No description

Parameters

string $message
int $statusCode

Return Value

void

void __invoke()

No description

Return Value

void