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