mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-08 01:05:37 +08:00
2.0 KiB
2.0 KiB
ZM\Container\ContainerServicesProvider
registerServices
public function registerServices(string $scope): void
描述
注册服务
作用域:
global: worker start
request: request
message: message
connection: open, close, message
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| scope | string | 作用域 |
返回
| 类型 | 描述 |
|---|---|
| void |
cleanup
public function cleanup(): void
描述
清理服务
返回
| 类型 | 描述 |
|---|---|
| void |
registerGlobalServices
public function registerGlobalServices(ZM\Container\ContainerInterface $container): void
描述
注册全局服务
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| container | ZM\Container\ContainerInterface |
返回
| 类型 | 描述 |
|---|---|
| void |
registerRequestServices
public function registerRequestServices(ZM\Container\ContainerInterface $container): void
描述
注册请求服务(HTTP请求)
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| container | ZM\Container\ContainerInterface |
返回
| 类型 | 描述 |
|---|---|
| void |
registerMessageServices
public function registerMessageServices(ZM\Container\ContainerInterface $container): void
描述
注册消息服务(WS消息)
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| container | ZM\Container\ContainerInterface |
返回
| 类型 | 描述 |
|---|---|
| void |
registerConnectionServices
public function registerConnectionServices(ZM\Container\ContainerInterface $container): void
描述
注册链接服务
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| container | ZM\Container\ContainerInterface |
返回
| 类型 | 描述 |
|---|---|
| void |