mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 00:25:35 +08:00
update api docs
This commit is contained in:
committed by
github-actions[bot]
parent
598cf60e10
commit
b5ae76d298
@@ -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","ZM/Utils/CommandInfoUtil"]},{"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/OneBotV11","ZM/API/CQ","ZM/API/TuringAPI","ZM/API/ZMRobot","ZM/API/GoCqhttpAPIV11"]},{"title":"ZM/API/Proxies/Bot","collapsable":true,"children":["ZM/API/Proxies/Bot/AllGroupsProxy","ZM/API/Proxies/Bot/AllBotsProxy","ZM/API/Proxies/Bot/AbstractBotProxy"]},{"title":"ZM/Adapters","collapsable":true,"children":["ZM/Adapters/OneBot11Adapter"]},{"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/ModulePackCommand","ZM/Command/Module/ModuleListCommand"]},{"title":"ZM/Command/Server","collapsable":true,"children":["ZM/Command/Server/ServerStartCommand","ZM/Command/Server/ServerCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ZMConfig"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/WorkerContainer","ZM/Container/Container","ZM/Container/BoundMethod"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/DeleteBody","ZM/DB/InsertBody","ZM/DB/Table","ZM/DB/UpdateBody","ZM/DB/DB","ZM/DB/SelectBody"]},{"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/OnTask","ZM/Event/SwooleEvent/OnMessage"]},{"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/MySQLWrapper","ZM/MySQL/MySQLStatementWrapper","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLConnection","ZM/MySQL/MySQLStatement"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/LightCacheInside","ZM/Store/ZMAtomic","ZM/Store/LightCache"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/DataProvider","ZM/Utils/SignalListener","ZM/Utils/CoMessage","ZM/Utils/MessageUtil","ZM/Utils/CommandInfoUtil","ZM/Utils/ReflectionUtil","ZM/Utils/HttpUtil","ZM/Utils/Terminal"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/WorkerManager","ZM/Utils/Manager/CronManager","ZM/Utils/Manager/ProcessManager"]}]
|
||||||
225
docs/api/ZM/Adapters/OneBot11Adapter.md
Normal file
225
docs/api/ZM/Adapters/OneBot11Adapter.md
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
# ZM\Adapters\OneBot11Adapter
|
||||||
|
|
||||||
|
## getName
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function getName(): string
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
{@inheritDoc}
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| string | |
|
||||||
|
|
||||||
|
|
||||||
|
## getVersion
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function getVersion(): string
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
{@inheritDoc}
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| string | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleIncomingRequest
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleIncomingRequest(Swoole\WebSocket\Frame $frame, ZM\Context\ContextInterface $context): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
{@inheritDoc}
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| frame | Swoole\WebSocket\Frame | |
|
||||||
|
| context | ZM\Context\ContextInterface | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleAPIResponse
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleAPIResponse(array $data, ContextInterface $context): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理 API 响应
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 数据 |
|
||||||
|
| context | ContextInterface | 上下文 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleMessageEvent
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleMessageEvent(array $data, ContextInterface $context): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理消息事件
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 消息数据 |
|
||||||
|
| context | ContextInterface | 上下文 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleMetaEvent
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleMetaEvent(array $data, ContextInterface $context): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理元事件
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 消息数据 |
|
||||||
|
| context | ContextInterface | 上下文 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleNoticeEvent
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleNoticeEvent(array $data, ContextInterface $context): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理通知事件
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 消息数据 |
|
||||||
|
| context | ContextInterface | 上下文 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleRequestEvent
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleRequestEvent(array $data, ContextInterface $context): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理请求事件
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 消息数据 |
|
||||||
|
| context | ContextInterface | 上下文 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleBeforeEvent
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleBeforeEvent(array $data, string $time): ZM\Event\EventDispatcher
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理前置事件
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 消息数据 |
|
||||||
|
| time | string | 执行时机 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| ZM\Event\EventDispatcher | |
|
||||||
|
|
||||||
|
|
||||||
|
## handleAfterEvent
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function handleAfterEvent(array $data): ZM\Event\EventDispatcher
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
处理后置事件
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| data | array | 消息数据 |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| ZM\Event\EventDispatcher | |
|
||||||
24
docs/api/ZM/Command/Server/ServerCommand.md
Normal file
24
docs/api/ZM/Command/Server/ServerCommand.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# ZM\Command\Server\ServerCommand
|
||||||
|
|
||||||
|
## execute
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| input | Symfony\Component\Console\Input\InputInterface | |
|
||||||
|
| output | Symfony\Component\Console\Output\OutputInterface | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| int | |
|
||||||
24
docs/api/ZM/Command/Server/ServerStartCommand.md
Normal file
24
docs/api/ZM/Command/Server/ServerStartCommand.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# ZM\Command\Server\ServerStartCommand
|
||||||
|
|
||||||
|
## execute
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| input | Symfony\Component\Console\Input\InputInterface | |
|
||||||
|
| output | Symfony\Component\Console\Output\OutputInterface | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| int | |
|
||||||
111
docs/api/ZM/Config/ZMConfig.md
Normal file
111
docs/api/ZM/Config/ZMConfig.md
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
# ZM\Config\ZMConfig
|
||||||
|
|
||||||
|
## restoreDirectory
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function restoreDirectory(): mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## get
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function get(mixed $additional_key, string $name): null|array|false|mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| additional_key | mixed | |
|
||||||
|
| name | string | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| null|array|false|mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## loadConfig
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function loadConfig(string $name): array|int|string
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| name | string | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| array|int|string | |
|
||||||
|
|
||||||
|
|
||||||
|
## parseList
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function parseList(string $name): void
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
通过名称将所有该名称的配置文件路径和信息读取到列表中
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| name | string | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| void | |
|
||||||
|
|
||||||
|
|
||||||
|
## readConfigFromFile
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function readConfigFromFile(mixed $filename, mixed $ext_name): mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| filename | mixed | |
|
||||||
|
| ext_name | mixed | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| mixed | |
|
||||||
@@ -1 +1,73 @@
|
|||||||
# ZM\Utils\Manager\ProcessManager
|
# ZM\Utils\Manager\ProcessManager
|
||||||
|
|
||||||
|
## removeProcessState
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function removeProcessState(null|int|string $id_or_name, int $type): mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
作者很懒,什么也没有说
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| id_or_name | null|int|string | |
|
||||||
|
| type | int | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## getProcessState
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function getProcessState(mixed $id_or_name, int $type): false|int|mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
用于框架内部获取多进程运行状态的函数
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| id_or_name | mixed | |
|
||||||
|
| type | int | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| false|int|mixed | |
|
||||||
|
|
||||||
|
|
||||||
|
## saveProcessState
|
||||||
|
|
||||||
|
```php
|
||||||
|
public function saveProcessState(int|string $pid, int $type, array $data): mixed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 描述
|
||||||
|
|
||||||
|
将各进程的pid写入文件,以备后续崩溃及僵尸进程处理使用
|
||||||
|
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 描述 |
|
||||||
|
| -------- | ---- | ----------- |
|
||||||
|
| pid | int|string | |
|
||||||
|
| type | int | |
|
||||||
|
| data | array | |
|
||||||
|
|
||||||
|
### 返回
|
||||||
|
|
||||||
|
| 类型 | 描述 |
|
||||||
|
| ---- | ----------- |
|
||||||
|
| mixed | |
|
||||||
|
|||||||
Reference in New Issue
Block a user