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