mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 14:58:42 +00:00
Prepare install application
This commit is contained in:
parent
61ca4d2e6a
commit
cfb8cad454
|
|
@ -106,13 +106,13 @@ class Dispatcher
|
||||||
{
|
{
|
||||||
$views = [];
|
$views = [];
|
||||||
$dispatch = explode(':', $controller);
|
$dispatch = explode(':', $controller);
|
||||||
$this->getController($dispatch[0]);
|
|
||||||
|
|
||||||
if (($c = count($dispatch)) === 3) {
|
if (($c = count($dispatch)) === 3) {
|
||||||
/* Handling static functions */
|
/* Handling static functions */
|
||||||
$function = $dispatch[0] . '::' . $dispatch[2];
|
$function = $dispatch[0] . '::' . $dispatch[2];
|
||||||
$views[$controller] = $function(...$data);
|
$views[$controller] = $function(...$data);
|
||||||
} elseif ($c === 2) {
|
} elseif ($c === 2) {
|
||||||
|
$this->getController($dispatch[0]);
|
||||||
$views[$controller] = $this->controllers[$dispatch[0]]->{$dispatch[1]}(...$data);
|
$views[$controller] = $this->controllers[$dispatch[0]]->{$dispatch[1]}(...$data);
|
||||||
} else {
|
} else {
|
||||||
throw new \UnexpectedValueException('Unexpected function.');
|
throw new \UnexpectedValueException('Unexpected function.');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user