zhamao-framework/docs/api/ZM/Container/ContainerServicesProvider.md

140 lines
2.0 KiB
Markdown
Raw Normal View History

2022-05-28 09:33:43 +00:00
# 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 | |