update api docs

This commit is contained in:
Github Build Bot 2022-05-04 09:05:13 +00:00
parent 8ce6e2c111
commit 088031f807
3 changed files with 139 additions and 18 deletions

View File

@ -1 +1 @@
module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/CQ","ZM/API/OneBotV11","ZM/API/ZMRobot","ZM/API/GoCqhttpAPIV11","ZM/API/TuringAPI"]},{"title":"ZM/API/Proxies/Bot","collapsable":true,"children":["ZM/API/Proxies/Bot/AllBotsProxy","ZM/API/Proxies/Bot/AllGroupsProxy","ZM/API/Proxies/Bot/AbstractBotProxy"]},{"title":"ZM/Annotation/Swoole","collapsable":true,"children":["ZM/Annotation/Swoole/OnSwooleEventBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Module","collapsable":true,"children":["ZM/Command/Module/ModuleListCommand","ZM/Command/Module/ModulePackCommand"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/Container","ZM/Container/BoundMethod","ZM/Container/WorkerContainer"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/InsertBody","ZM/DB/Table","ZM/DB/DB","ZM/DB/DeleteBody","ZM/DB/SelectBody","ZM/DB/UpdateBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventTracer","ZM/Event/EventManager","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnMessage","ZM/Event/SwooleEvent/OnTask"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModuleUnpacker","ZM/Module/ModulePacker","ZM/Module/ModuleBase"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLStatementWrapper","ZM/MySQL/MySQLStatement","ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLConnection"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/ZMAtomic","ZM/Store/LightCacheInside","ZM/Store/LightCache"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/SignalListener","ZM/Utils/CoMessage","ZM/Utils/Terminal","ZM/Utils/MessageUtil","ZM/Utils/DataProvider","ZM/Utils/HttpUtil","ZM/Utils/ReflectionUtil"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/WorkerManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/CronManager"]}]
module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/CQ","ZM/API/OneBotV11","ZM/API/ZMRobot","ZM/API/GoCqhttpAPIV11","ZM/API/TuringAPI"]},{"title":"ZM/API/Proxies/Bot","collapsable":true,"children":["ZM/API/Proxies/Bot/AllBotsProxy","ZM/API/Proxies/Bot/AllGroupsProxy","ZM/API/Proxies/Bot/AbstractBotProxy"]},{"title":"ZM/Annotation/Swoole","collapsable":true,"children":["ZM/Annotation/Swoole/OnSwooleEventBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Module","collapsable":true,"children":["ZM/Command/Module/ModuleListCommand","ZM/Command/Module/ModulePackCommand"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/Container","ZM/Container/BoundMethod","ZM/Container/WorkerContainer"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/InsertBody","ZM/DB/Table","ZM/DB/DB","ZM/DB/DeleteBody","ZM/DB/SelectBody","ZM/DB/UpdateBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventTracer","ZM/Event/EventManager","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnMessage","ZM/Event/SwooleEvent/OnTask"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModuleUnpacker","ZM/Module/ModulePacker","ZM/Module/ModuleBase"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLStatementWrapper","ZM/MySQL/MySQLStatement","ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLConnection"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/ZMAtomic","ZM/Store/LightCacheInside","ZM/Store/LightCache"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/SignalListener","ZM/Utils/CoMessage","ZM/Utils/Terminal","ZM/Utils/MessageUtil","ZM/Utils/DataProvider","ZM/Utils/HttpUtil","ZM/Utils/ReflectionUtil","ZM/Utils/CommandInfoUtil"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/WorkerManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/CronManager"]}]

View File

@ -0,0 +1,138 @@
# ZM\Utils\CommandInfoUtil
## exists
```php
public function exists(): bool
```
### 描述
判断命令信息是否已生成并缓存
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| bool | |
## get
```php
public function get(): array
```
### 描述
获取命令信息
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| array | |
## regenerate
```php
public function regenerate(): void
```
### 描述
重新生成命令信息
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| void | |
## getHelp
```php
public function getHelp(string $command_id, bool $simple): string
```
### 描述
获取命令帮助
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| command_id | string | 命令ID`class@method` 格式 |
| simple | bool | 是否仅输出简易信息(只有命令触发条件和描述) |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| string | |
## save
```php
public function save(array $helps): void
```
### 描述
缓存命令信息
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| helps | array | |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| void | |
## generateCommandList
```php
public function generateCommandList(): array
```
### 描述
根据注解树生成命令信息(内部)
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| array | |
## generateCommandArgumentList
```php
public function generateCommandArgumentList(string $id): array
```
### 描述
生成指定命令的参数列表
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| id | string | 命令 ID |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| array | |

View File

@ -194,23 +194,6 @@ public function arrayToStr(array $array): string
| string | |
## generateCommandHelp
```php
public function generateCommandHelp(): array
```
### 描述
根据注解树生成命令列表、帮助
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| array | 帮助信息,每个元素对应一个命令的帮助信息,格式为:命令名(其他触发条件):命令描述 |
## checkArguments
```php