mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-18 14:15:34 +08:00
add @CommandArgument annotation
* add @CommandArgument and relevant event changes * fix unknown bug * remove relative constant for CommandArgument
This commit is contained in:
@@ -23,6 +23,8 @@ class EventManager
|
||||
|
||||
public static $middleware_map = [];
|
||||
|
||||
public static $event_map = [];
|
||||
|
||||
public static $middlewares = [];
|
||||
|
||||
public static $req_mapping = [];
|
||||
@@ -33,6 +35,7 @@ class EventManager
|
||||
Console::debug("Adding event {$event_name} at @Anonymous");
|
||||
} else {
|
||||
Console::debug("Adding event {$event_name} at " . ($event_obj->class) . ':' . ($event_obj->method));
|
||||
self::$event_map[$event_obj->class][$event_obj->method][] = $event_obj;
|
||||
}
|
||||
self::$events[$event_name][] = $event_obj;
|
||||
(new AnnotationParser())->sortByLevel(self::$events, $event_name);
|
||||
|
||||
Reference in New Issue
Block a user