From ede5f456a876056666b7ea26c02e2a4b5968d5ed Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 18 Dec 2022 12:14:51 +0000 Subject: [PATCH] update api docs --- docs/.vuepress/api.js | 2 +- .../ZM/Event/Listener/HttpEventListener.md | 4 +- docs/api/ZM/Event/Listener/WSEventListener.md | 23 ++++++ docs/api/ZM/Plugin/OneBot12Adapter.md | 23 ++++++ docs/api/ZM/Plugin/PluginManager.md | 23 ++++++ docs/api/ZM/Utils/ConnectionUtil.md | 71 +++++++++++++++++++ docs/api/ZM/Utils/HttpUtil.md | 4 +- 7 files changed, 145 insertions(+), 5 deletions(-) create mode 100644 docs/api/ZM/Plugin/OneBot12Adapter.md create mode 100644 docs/api/ZM/Plugin/PluginManager.md create mode 100644 docs/api/ZM/Utils/ConnectionUtil.md diff --git a/docs/.vuepress/api.js b/docs/.vuepress/api.js index 146d766f..b0f3c853 100644 --- a/docs/.vuepress/api.js +++ b/docs/.vuepress/api.js @@ -1 +1 @@ -module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMApplication","ZM/ConsoleApplication"]},{"title":"ZM/Annotation","collapsable":true,"children":["ZM/Annotation/AnnotationHandler","ZM/Annotation/AnnotationMap","ZM/Annotation/AnnotationParser","ZM/Annotation/AnnotationBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/InitCommand","ZM/Command/Command","ZM/Command/ProxyServerCommand","ZM/Command/CheckConfigCommand","ZM/Command/BuildCommand"]},{"title":"ZM/Command/Server","collapsable":true,"children":["ZM/Command/Server/ServerStartCommand","ZM/Command/Server/ServerCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ZMConfig","ZM/Config/ConfigTracer"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/ContainerServicesProvider","ZM/Container/BoundMethod","ZM/Container/WorkerContainer","ZM/Container/Container"]},{"title":"ZM/Context","collapsable":true,"children":["ZM/Context/Context"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventProvider","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/Listener","collapsable":true,"children":["ZM/Event/Listener/MasterEventListener","ZM/Event/Listener/ManagerEventListener","ZM/Event/Listener/HttpEventListener","ZM/Event/Listener/WorkerEventListener","ZM/Event/Listener/SignalListener","ZM/Event/Listener/WSEventListener"]},{"title":"ZM/Middleware","collapsable":true,"children":["ZM/Middleware/MiddlewareHandler","ZM/Middleware/Pipeline"]},{"title":"ZM/Process","collapsable":true,"children":["ZM/Process/ProcessStateManager"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/FileSystem"]},{"title":"ZM/Store/Database","collapsable":true,"children":["ZM/Store/Database/DBWrapper","ZM/Store/Database/DBStatement","ZM/Store/Database/DBPool","ZM/Store/Database/DBStatementWrapper","ZM/Store/Database/DBConnection","ZM/Store/Database/DBQueryBuilder"]},{"title":"ZM/Store/Lock","collapsable":true,"children":["ZM/Store/Lock/FileLock"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/EasterEgg","ZM/Utils/ReflectionUtil","ZM/Utils/ZMUtil","ZM/Utils/HttpUtil"]}] \ No newline at end of file +module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMApplication","ZM/ConsoleApplication"]},{"title":"ZM/Annotation","collapsable":true,"children":["ZM/Annotation/AnnotationHandler","ZM/Annotation/AnnotationMap","ZM/Annotation/AnnotationParser","ZM/Annotation/AnnotationBase"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/InitCommand","ZM/Command/Command","ZM/Command/ProxyServerCommand","ZM/Command/BuildCommand"]},{"title":"ZM/Command/Server","collapsable":true,"children":["ZM/Command/Server/ServerStartCommand","ZM/Command/Server/ServerCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ZMConfig","ZM/Config/ConfigTracer"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/ContainerServicesProvider","ZM/Container/BoundMethod","ZM/Container/WorkerContainer","ZM/Container/Container"]},{"title":"ZM/Context","collapsable":true,"children":["ZM/Context/Context"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventProvider","ZM/Event/EventDispatcher"]},{"title":"ZM/Event/Listener","collapsable":true,"children":["ZM/Event/Listener/MasterEventListener","ZM/Event/Listener/ManagerEventListener","ZM/Event/Listener/HttpEventListener","ZM/Event/Listener/WorkerEventListener","ZM/Event/Listener/SignalListener","ZM/Event/Listener/WSEventListener"]},{"title":"ZM/Middleware","collapsable":true,"children":["ZM/Middleware/MiddlewareHandler","ZM/Middleware/Pipeline"]},{"title":"ZM/Plugin","collapsable":true,"children":["ZM/Plugin/PluginManager","ZM/Plugin/OneBot12Adapter"]},{"title":"ZM/Process","collapsable":true,"children":["ZM/Process/ProcessStateManager"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/FileSystem"]},{"title":"ZM/Store/Database","collapsable":true,"children":["ZM/Store/Database/DBWrapper","ZM/Store/Database/DBStatement","ZM/Store/Database/DBPool","ZM/Store/Database/DBStatementWrapper","ZM/Store/Database/DBConnection","ZM/Store/Database/DBQueryBuilder"]},{"title":"ZM/Store/Lock","collapsable":true,"children":["ZM/Store/Lock/FileLock"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/EasterEgg","ZM/Utils/ConnectionUtil","ZM/Utils/ReflectionUtil","ZM/Utils/ZMUtil","ZM/Utils/HttpUtil"]}] \ No newline at end of file diff --git a/docs/api/ZM/Event/Listener/HttpEventListener.md b/docs/api/ZM/Event/Listener/HttpEventListener.md index 996924ae..f93dfb37 100644 --- a/docs/api/ZM/Event/Listener/HttpEventListener.md +++ b/docs/api/ZM/Event/Listener/HttpEventListener.md @@ -26,7 +26,7 @@ public function onRequest999(OneBot\Driver\Event\Http\HttpRequestEvent $event): ## onRequest1 ```php -public function onRequest1(OneBot\Driver\Event\Http\HttpRequestEvent $event): mixed +public function onRequest1(OneBot\Driver\Event\Http\HttpRequestEvent $event): void ``` ### 描述 @@ -43,7 +43,7 @@ public function onRequest1(OneBot\Driver\Event\Http\HttpRequestEvent $event): mi | 类型 | 描述 | | ---- | ----------- | -| mixed | | +| void | | ## getInstance diff --git a/docs/api/ZM/Event/Listener/WSEventListener.md b/docs/api/ZM/Event/Listener/WSEventListener.md index ca1a9ddf..c82bcc73 100644 --- a/docs/api/ZM/Event/Listener/WSEventListener.md +++ b/docs/api/ZM/Event/Listener/WSEventListener.md @@ -1,5 +1,28 @@ # ZM\Event\Listener\WSEventListener +## onWebSocketOpen + +```php +public function onWebSocketOpen(OneBot\Driver\Event\WebSocket\WebSocketOpenEvent $event): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| event | OneBot\Driver\Event\WebSocket\WebSocketOpenEvent | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + ## getInstance ```php diff --git a/docs/api/ZM/Plugin/OneBot12Adapter.md b/docs/api/ZM/Plugin/OneBot12Adapter.md new file mode 100644 index 00000000..51ada977 --- /dev/null +++ b/docs/api/ZM/Plugin/OneBot12Adapter.md @@ -0,0 +1,23 @@ +# ZM\Plugin\OneBot12Adapter + +## handleWSReverseInput + +```php +public function handleWSReverseInput(OneBot\Driver\Event\WebSocket\WebSocketOpenEvent $event): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| event | OneBot\Driver\Event\WebSocket\WebSocketOpenEvent | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | diff --git a/docs/api/ZM/Plugin/PluginManager.md b/docs/api/ZM/Plugin/PluginManager.md new file mode 100644 index 00000000..8d2de93c --- /dev/null +++ b/docs/api/ZM/Plugin/PluginManager.md @@ -0,0 +1,23 @@ +# ZM\Plugin\PluginManager + +## addPlugin + +```php +public function addPlugin(array $meta): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| meta | array | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | diff --git a/docs/api/ZM/Utils/ConnectionUtil.md b/docs/api/ZM/Utils/ConnectionUtil.md new file mode 100644 index 00000000..76e11cb4 --- /dev/null +++ b/docs/api/ZM/Utils/ConnectionUtil.md @@ -0,0 +1,71 @@ +# ZM\Utils\ConnectionUtil + +## addConnection + +```php +public function addConnection(int $fd, array $handle): bool +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| fd | int | | +| handle | array | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| bool | | + + +## setConnection + +```php +public function setConnection(int $fd, array $handle): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| fd | int | | +| handle | array | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## removeConnection + +```php +public function removeConnection(int $fd): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| fd | int | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | diff --git a/docs/api/ZM/Utils/HttpUtil.md b/docs/api/ZM/Utils/HttpUtil.md index ecf1bb8f..d08eb946 100644 --- a/docs/api/ZM/Utils/HttpUtil.md +++ b/docs/api/ZM/Utils/HttpUtil.md @@ -3,7 +3,7 @@ ## parseUri ```php -public function parseUri(OneBot\Http\ServerRequest $request, mixed $node, mixed $params): int +public function parseUri(Psr\Http\Message\RequestInterface $request, mixed $node, mixed $params): int ``` ### 描述 @@ -14,7 +14,7 @@ public function parseUri(OneBot\Http\ServerRequest $request, mixed $node, mixed | 名称 | 类型 | 描述 | | -------- | ---- | ----------- | -| request | OneBot\Http\ServerRequest | | +| request | Psr\Http\Message\RequestInterface | | | node | mixed | | | params | mixed | |