mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
fix help generator not working with alias (#69)
This commit is contained in:
parent
c077e9418c
commit
d73e771ef3
@ -298,7 +298,13 @@ class MessageUtil
|
||||
foreach ($possible_keys as $key => $help_format) {
|
||||
// 如果定义了该参数,则添加到帮助信息中
|
||||
if (isset($annotation->{$key}) && !empty($annotation->{$key})) {
|
||||
$command_seg[] = sprintf($help_format, $annotation->{$key});
|
||||
if (is_iterable($annotation->{$key})) {
|
||||
foreach ($annotation->{$key} as $item) {
|
||||
$command_seg[] = sprintf($help_format, $item);
|
||||
}
|
||||
} else {
|
||||
$command_seg[] = sprintf($help_format, $annotation->{$key});
|
||||
}
|
||||
}
|
||||
}
|
||||
// 第一个触发参数为主命令名
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user