This commit is contained in:
2021-02-22 17:44:24 +08:00
parent 3b09b9a308
commit 2d1f83cf09
34 changed files with 732 additions and 222 deletions
+12
View File
@@ -33,6 +33,7 @@ use Snowflake\Exception\ComponentException;
use Snowflake\Exception\InitException;
use Snowflake\Jwt\Jwt;
use Snowflake\Pool\Connection;
use Snowflake\Pool\ObjectPool;
use Snowflake\Pool\Redis as SRedis;
use Snowflake\Snowflake;
use Snowflake\Event;
@@ -404,6 +405,16 @@ abstract class BaseApplication extends Service
}
/**
* @return ObjectPool
* @throws ComponentException
*/
public function getObject(): ObjectPool
{
return $this->get('object');
}
/**
* @throws Exception
*/
@@ -424,6 +435,7 @@ abstract class BaseApplication extends Service
'redis' => ['class' => Redis::class],
'jwt' => ['class' => Jwt::class],
'async' => ['class' => Async::class],
'object' => ['class' => ObjectPool::class],
'goto' => ['class' => BaseGoto::class],
'http2' => ['class' => Http2::class],
]);