zhamao-framework/docs/api/ZM/Container/ContainerServicesProvider.md
2022-05-28 09:33:43 +00:00

140 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 | |