diff --git a/README.md b/README.md index c2ea5a2..2eb7c16 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/src/Mongodb.php b/src/Mongodb.php index 8f5ca17..1b24822 100644 --- a/src/Mongodb.php +++ b/src/Mongodb.php @@ -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