diff --git a/docs/.vuepress/api.js b/docs/.vuepress/api.js index 74425f53..d83b417b 100644 --- a/docs/.vuepress/api.js +++ b/docs/.vuepress/api.js @@ -1 +1 @@ -module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/CQ","ZM/API/TuringAPI","ZM/API/OneBotV11","ZM/API/GoCqhttpAPIV11","ZM/API/ZMRobot"]},{"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/ServerCommand","ZM/Command/Server/ServerStartCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ZMConfig"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/BoundMethod","ZM/Container/WorkerContainer","ZM/Container/Container"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/DB","ZM/DB/Table","ZM/DB/SelectBody","ZM/DB/UpdateBody","ZM/DB/InsertBody","ZM/DB/DeleteBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventManager","ZM/Event/EventDispatcher","ZM/Event/EventTracer"]},{"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/ModulePacker","ZM/Module/ModuleUnpacker","ZM/Module/ModuleBase"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLStatement","ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLConnection","ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLStatementWrapper"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/ZMAtomic","ZM/Store/LightCache","ZM/Store/LightCacheInside"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/DataProvider","ZM/Utils/Terminal","ZM/Utils/SignalListener","ZM/Utils/MessageUtil","ZM/Utils/HttpUtil","ZM/Utils/ReflectionUtil","ZM/Utils/CoMessage","ZM/Utils/CommandInfoUtil"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/CronManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/ProcessManager","ZM/Utils/Manager/WorkerManager"]}] \ No newline at end of file +module.exports = [{"title":"ZM","collapsable":true,"children":["ZM/ZMServer"]},{"title":"ZM/API","collapsable":true,"children":["ZM/API/CQ","ZM/API/TuringAPI","ZM/API/OneBotV11","ZM/API/GoCqhttpAPIV11","ZM/API/ZMRobot"]},{"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/ServerCommand","ZM/Command/Server/ServerStartCommand"]},{"title":"ZM/Config","collapsable":true,"children":["ZM/Config/ZMConfig"]},{"title":"ZM/Container","collapsable":true,"children":["ZM/Container/BoundMethod","ZM/Container/WorkerContainer","ZM/Container/ContainerServicesProvider","ZM/Container/Container"]},{"title":"ZM/DB","collapsable":true,"children":["ZM/DB/DB","ZM/DB/Table","ZM/DB/SelectBody","ZM/DB/UpdateBody","ZM/DB/InsertBody","ZM/DB/DeleteBody"]},{"title":"ZM/Event","collapsable":true,"children":["ZM/Event/EventManager","ZM/Event/EventDispatcher","ZM/Event/EventTracer"]},{"title":"ZM/Event/SwooleEvent","collapsable":true,"children":["ZM/Event/SwooleEvent/OnTask"]},{"title":"ZM/Http","collapsable":true,"children":["ZM/Http/Response"]},{"title":"ZM/Module","collapsable":true,"children":["ZM/Module/ModulePacker","ZM/Module/ModuleUnpacker","ZM/Module/ModuleBase"]},{"title":"ZM/MySQL","collapsable":true,"children":["ZM/MySQL/MySQLStatement","ZM/MySQL/MySQLQueryBuilder","ZM/MySQL/MySQLConnection","ZM/MySQL/MySQLWrapper","ZM/MySQL/MySQLPool","ZM/MySQL/MySQLStatementWrapper"]},{"title":"ZM/Store","collapsable":true,"children":["ZM/Store/ZMAtomic","ZM/Store/LightCache","ZM/Store/LightCacheInside"]},{"title":"ZM/Store/Redis","collapsable":true,"children":["ZM/Store/Redis/ZMRedis"]},{"title":"ZM/Utils","collapsable":true,"children":["ZM/Utils/DataProvider","ZM/Utils/Terminal","ZM/Utils/SignalListener","ZM/Utils/MessageUtil","ZM/Utils/HttpUtil","ZM/Utils/ReflectionUtil","ZM/Utils/CoMessage","ZM/Utils/CommandInfoUtil"]},{"title":"ZM/Utils/Manager","collapsable":true,"children":["ZM/Utils/Manager/CronManager","ZM/Utils/Manager/ModuleManager","ZM/Utils/Manager/ProcessManager","ZM/Utils/Manager/WorkerManager"]}] \ No newline at end of file diff --git a/docs/api/ZM/Container/ContainerServicesProvider.md b/docs/api/ZM/Container/ContainerServicesProvider.md new file mode 100644 index 00000000..65ab59c4 --- /dev/null +++ b/docs/api/ZM/Container/ContainerServicesProvider.md @@ -0,0 +1,139 @@ +# ZM\Container\ContainerServicesProvider + +## registerServices + +```php +public function registerServices(string $scope): void +``` + +### 描述 + +注册服务 +``` +作用域: +global: worker start +request: request +message: message +connection: open, close, message +``` + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| scope | string | 作用域 | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## cleanup + +```php +public function cleanup(): void +``` + +### 描述 + +清理服务 + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## registerGlobalServices + +```php +public function registerGlobalServices(ZM\Container\ContainerInterface $container): void +``` + +### 描述 + +注册全局服务 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| container | ZM\Container\ContainerInterface | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## registerRequestServices + +```php +public function registerRequestServices(ZM\Container\ContainerInterface $container): void +``` + +### 描述 + +注册请求服务(HTTP请求) + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| container | ZM\Container\ContainerInterface | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## registerMessageServices + +```php +public function registerMessageServices(ZM\Container\ContainerInterface $container): void +``` + +### 描述 + +注册消息服务(WS消息) + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| container | ZM\Container\ContainerInterface | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | | + + +## registerConnectionServices + +```php +public function registerConnectionServices(ZM\Container\ContainerInterface $container): void +``` + +### 描述 + +注册链接服务 + +### 参数 + +| 名称 | 类型 | 描述 | +| -------- | ---- | ----------- | +| container | ZM\Container\ContainerInterface | | + +### 返回 + +| 类型 | 描述 | +| ---- | ----------- | +| void | |