From 2679facf240bdaae70feb15186ce228b9a948e6f Mon Sep 17 00:00:00 2001 From: sunxyw Date: Sat, 27 Aug 2022 18:20:37 +0000 Subject: [PATCH] update api docs --- docs/.vuepress/api.js | 2 +- docs/api/ZM/Config/ConfigTracer.md | 73 ++++++++++++++ docs/api/ZM/Config/ZMConfig.md | 155 +++++++++++++++++------------ 3 files changed, 163 insertions(+), 67 deletions(-) create mode 100644 docs/api/ZM/Config/ConfigTracer.md diff --git a/docs/.vuepress/api.js b/docs/.vuepress/api.js index c10030de..198af62c 100644 --- a/docs/.vuepress/api.js +++ b/docs/.vuepress/api.js @@ -1 +1 @@ -module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/InstantApplication","ZM/ConsoleApplication"]},{"title":"ZM/Annotation","collapsable":true,"children":["ZM/Annotation/AnnotationBase","ZM/Annotation/AnnotationHandler","ZM/Annotation/AnnotationMap","ZM/Annotation/AnnotationParser"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/BuildCommand","ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Server","collapsable":true,"children":["ZM/Command/Server/ServerCommand","ZM/Command/Server/ServerStartCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ZMConfig"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/Container","ZM/Container/BoundMethod","ZM/Container/ContainerServicesProvider","ZM/Container/WorkerContainer"]},{"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/WorkerEventListener","ZM/Event/Listener/ManagerEventListener","ZM/Event/Listener/MasterEventListener","ZM/Event/Listener/SignalListener","ZM/Event/Listener/HttpEventListener"]},{"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/DBStatement","ZM/Store/Database/DBQueryBuilder","ZM/Store/Database/DBConnection","ZM/Store/Database/DBWrapper","ZM/Store/Database/DBPool","ZM/Store/Database/DBStatementWrapper"]},{"title":"ZM/Store/Lock","collapsable":true,"children":["ZM/Store/Lock/FileLock"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/ReflectionUtil","ZM/Utils/HttpUtil","ZM/Utils/ZMUtil"]}] \ No newline at end of file +module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/InstantApplication","ZM/ConsoleApplication"]},{"title":"ZM/Annotation","collapsable":true,"children":["ZM/Annotation/AnnotationBase","ZM/Annotation/AnnotationHandler","ZM/Annotation/AnnotationMap","ZM/Annotation/AnnotationParser"]},{"title":"ZM/Command","collapsable":true,"children":["ZM/Command/BuildCommand","ZM/Command/CheckConfigCommand"]},{"title":"ZM/Command/Server","collapsable":true,"children":["ZM/Command/Server/ServerCommand","ZM/Command/Server/ServerStartCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ConfigTracer","ZM/Config/ZMConfig"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/Container","ZM/Container/BoundMethod","ZM/Container/ContainerServicesProvider","ZM/Container/WorkerContainer"]},{"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/WorkerEventListener","ZM/Event/Listener/ManagerEventListener","ZM/Event/Listener/MasterEventListener","ZM/Event/Listener/SignalListener","ZM/Event/Listener/HttpEventListener"]},{"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/DBStatement","ZM/Store/Database/DBQueryBuilder","ZM/Store/Database/DBConnection","ZM/Store/Database/DBWrapper","ZM/Store/Database/DBPool","ZM/Store/Database/DBStatementWrapper"]},{"title":"ZM/Store/Lock","collapsable":true,"children":["ZM/Store/Lock/FileLock"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/ReflectionUtil","ZM/Utils/HttpUtil","ZM/Utils/ZMUtil"]}] \ No newline at end of file diff --git a/docs/api/ZM/Config/ConfigTracer.md b/docs/api/ZM/Config/ConfigTracer.md new file mode 100644 index 00000000..1ce48364 --- /dev/null +++ b/docs/api/ZM/Config/ConfigTracer.md @@ -0,0 +1,73 @@ +# ZM\Config\ConfigTracer + +## addTracesOf + +```php +public function addTracesOf(string $group, array $traces, string $source): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| group | string | | +| traces | array | | +| source | string | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## getTraceOf + +```php +public function getTraceOf(string $key): string +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| key | string | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| string | | + + +## flatten + +```php +public function flatten(string $prefix, array $array, string $source): array +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| prefix | string | | +| array | array | | +| source | string | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| array | | diff --git a/docs/api/ZM/Config/ZMConfig.md b/docs/api/ZM/Config/ZMConfig.md index f332cef2..d840b33f 100644 --- a/docs/api/ZM/Config/ZMConfig.md +++ b/docs/api/ZM/Config/ZMConfig.md @@ -24,69 +24,6 @@ public function __construct(array $config_paths, string $environment): mixed | mixed | | -## addConfigPath - -```php -public function addConfigPath(string $path): void -``` - -### 描述 - -作者很懒,什么也没有说 - -### 参数 - -| 名称 | 类型 | 描述 | -| -------- | ---- | ----------- | -| path | string | | - -### 返回 - -| 类型 | 描述 | -| ---- | ----------- | -| void | | - - -## getEnvironment - -```php -public function getEnvironment(): string -``` - -### 描述 - -作者很懒,什么也没有说 - -### 返回 - -| 类型 | 描述 | -| ---- | ----------- | -| string | | - - -## setEnvironment - -```php -public function setEnvironment(string $environment): void -``` - -### 描述 - -作者很懒,什么也没有说 - -### 参数 - -| 名称 | 类型 | 描述 | -| -------- | ---- | ----------- | -| environment | string | | - -### 返回 - -| 类型 | 描述 | -| ---- | ----------- | -| void | | - - ## loadFiles ```php @@ -176,10 +113,33 @@ public function set(mixed $key, mixed $value): void | void | | -## getHolder +## addConfigPath ```php -public function getHolder(): OneBot\V12\Config\Config +public function addConfigPath(string $path): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| path | string | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## getEnvironment + +```php +public function getEnvironment(): string ``` ### 描述 @@ -190,7 +150,30 @@ public function getHolder(): OneBot\V12\Config\Config | 类型 | 描述 | | ---- | ----------- | -| OneBot\V12\Config\Config | | +| string | | + + +## setEnvironment + +```php +public function setEnvironment(string $environment): void +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| environment | string | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | ## reload @@ -210,6 +193,46 @@ public function reload(): void | void | | +## getHolder + +```php +public function getHolder(): OneBot\V12\Config\Config +``` + +### 描述 + +作者很懒,什么也没有说 + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| OneBot\V12\Config\Config | | + + +## getTrace + +```php +public function getTrace(string $key): string +``` + +### 描述 + +作者很懒,什么也没有说 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| key | string | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| string | | + + ## getFileMeta ```php