This commit is contained in:
2021-03-08 18:52:25 +08:00
parent a2542b7ba1
commit 098b33c672
3 changed files with 27 additions and 16 deletions
+10 -7
View File
@@ -286,25 +286,28 @@ abstract class BaseApplication extends Service
/**
* @return Connection
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws NotFindClassException|ComponentException
*/
public function getConnections(): Connection
public function getMysqlFromPool(): Connection
{
return $this->get('connections');
return $this->get('pool')->getDb();
}
/**
* @return SPool
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws NotFindClassException|ComponentException
* @return SRedis
*/
public function getPool(): SPool
public function getRedisFromPool(): SRedis
{
return $this->get('pool');
return $this->get('pool')->getRedis();
}
/**
* @return Response
* @throws ReflectionException