update readme

This commit is contained in:
zyimm 2022-10-23 15:22:06 +08:00
parent 53d686d4c4
commit d355bf12c8
2 changed files with 13 additions and 4 deletions

View File

@ -8,19 +8,21 @@
2. 增加单元测试,优化依赖。
3. 规范代码编写,简洁了源代码中一些不规范,重复高的代码。
# hyperf mongodb pool
# 使用
## 设置仓库源
```
## step 1
{
"repositories": [{
"type": "composer",
"url": "http://composer.zyimm.com"
}]
}
```
## 安装
## step 2
```
composer require zyimm/hyperf-mongodb
```

View File

@ -27,6 +27,11 @@ class Mongodb
*/
protected $poolName = 'default';
/**
* Mongodb
*
* @param PoolFactory $factory
*/
public function __construct(PoolFactory $factory)
{
$this->factory = $factory;
@ -79,6 +84,8 @@ class Mongodb
}
/**
* getContextKey
*
* The key to identify the connection object in coroutine context.
*/
private function getContextKey(): string