改名
This commit is contained in:
+14
-14
@@ -548,20 +548,20 @@ 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);
|
// $classes = Kiri::getAnnotation()->runtime(CONTROLLER_PATH);
|
||||||
|
//
|
||||||
$di = Kiri::getDi();
|
// $di = Kiri::getDi();
|
||||||
foreach ($classes as $class) {
|
// foreach ($classes as $class) {
|
||||||
$methods = $di->getMethodAttribute($class);
|
// $methods = $di->getMethodAttribute($class);
|
||||||
foreach ($methods as $method => $attribute) {
|
// foreach ($methods as $method => $attribute) {
|
||||||
if (empty($attribute)) {
|
// if (empty($attribute)) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
foreach ($attribute as $item) {
|
// foreach ($attribute as $item) {
|
||||||
$item->execute($class, $method);
|
// $item->execute($class, $method);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class OnServerWorker extends \Server\Abstracts\Server
|
|||||||
$this->eventDispatch->dispatch(new OnWorkerStart($server, $workerId));
|
$this->eventDispatch->dispatch(new OnWorkerStart($server, $workerId));
|
||||||
|
|
||||||
$this->workerInitExecutor($server, $annotation, $workerId);
|
$this->workerInitExecutor($server, $annotation, $workerId);
|
||||||
$this->interpretDirectory($annotation);
|
// $this->interpretDirectory($annotation);
|
||||||
|
|
||||||
$this->eventDispatch->dispatch(new OnAfterWorkerStart());
|
$this->eventDispatch->dispatch(new OnAfterWorkerStart());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,9 +153,9 @@ class Application extends BaseApplication
|
|||||||
$manager = Kiri::app()->get('console');
|
$manager = Kiri::app()->get('console');
|
||||||
$manager->register(Runtime::class);
|
$manager->register(Runtime::class);
|
||||||
$class = $manager->setParameters($argv)->search();
|
$class = $manager->setParameters($argv)->search();
|
||||||
if (!($class instanceof Command)) {
|
// if (!($class instanceof Command)) {
|
||||||
scan_directory(directory('app'), 'App');
|
scan_directory(directory('app'), 'App');
|
||||||
}
|
// }
|
||||||
$data = di(Response::class)->getBuilder($manager->execCommand($class));
|
$data = di(Response::class)->getBuilder($manager->execCommand($class));
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$data = di(Response::class)->getBuilder(logger()->exception($exception));
|
$data = di(Response::class)->getBuilder(logger()->exception($exception));
|
||||||
|
|||||||
Reference in New Issue
Block a user