111
This commit is contained in:
@@ -577,20 +577,6 @@ class Router extends HttpService implements RouterInterface
|
|||||||
public function _loader()
|
public function _loader()
|
||||||
{
|
{
|
||||||
$this->loadRouteDir(APP_PATH . 'routes');
|
$this->loadRouteDir(APP_PATH . 'routes');
|
||||||
$classes = Kiri::getAnnotation()->runtime(CONTROLLER_PATH);
|
|
||||||
|
|
||||||
$di = Kiri::getDi();
|
|
||||||
foreach ($classes as $class) {
|
|
||||||
$methods = $di->getMethodAttribute($class);
|
|
||||||
foreach ($methods as $method => $attribute) {
|
|
||||||
if (empty($attribute)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
foreach ($attribute as $item) {
|
|
||||||
$item['class']::execute((object)$item['params'], $class, $method);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -620,7 +606,6 @@ class Router extends HttpService implements RouterInterface
|
|||||||
try {
|
try {
|
||||||
$router = $this;
|
$router = $this;
|
||||||
include_once "{$files}";
|
include_once "{$files}";
|
||||||
var_dump($files);
|
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->addError($exception, 'throwable');
|
$this->addError($exception, 'throwable');
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user