MAPG-115 make possible to secure controllers

This commit is contained in:
bence committed 2020-06-09 00:57:01 +02:00
1 parent ed9621d581
commit ecaf8ca9d4
4 files changed
+45 -18

No files matched your search

+5 -8
View File
@@ -20,6 +20,11 @@ class Route
return $this->id;
}
public function getHandler(): array
{
return $this->handler;
}
public function generateLink(array $parameters = []): string
{
$link = [];
@@ -51,14 +56,6 @@ class Route
return implode('/', $link) . $query;
}
public function callController(array $parameters)
{
$controllerName = $this->handler[0];
$controller = new $controllerName();
return call_user_func([$controller, $this->handler[1]], $parameters);
}
public function testAgainst(array $path): ?array
{
$parameters = [];