This commit is contained in:
as2252258@163.com
2021-08-04 01:07:45 +08:00
parent a2d8691d8c
commit f5204f01e6
+28 -1
View File
@@ -46,7 +46,7 @@ use Swoole\Table;
* Class BaseApplication
* @package Snowflake\Snowflake\Base
*/
abstract class BaseApplication extends Service
abstract class BaseApplication extends Component
{
use TraitApplication;
@@ -246,6 +246,20 @@ abstract class BaseApplication extends Service
$this->get('error')->register();
}
/**
* @param $name
* @return mixed
* @throws \ReflectionException
* @throws \Snowflake\Exception\NotFindClassException
*/
public function get($name): mixed
{
return di(Service::class)->get($name);
}
/**
* @return mixed
*/
@@ -432,6 +446,19 @@ abstract class BaseApplication extends Service
}
/**
* @param $array
* @throws \ReflectionException
* @throws \Snowflake\Exception\NotFindClassException
*/
private function setComponents($array): void
{
di(Service::class)->setComponents($array);
}
/**
* @throws Exception
*/