modify plugin name
This commit is contained in:
@@ -15,6 +15,7 @@ use Kiri;
|
|||||||
use Kiri\Di\LocalService;
|
use Kiri\Di\LocalService;
|
||||||
use Kiri\Error\{ErrorHandler, StdoutLogger, StdoutLoggerInterface};
|
use Kiri\Error\{ErrorHandler, StdoutLogger, StdoutLoggerInterface};
|
||||||
use Kiri\Exception\{InitException};
|
use Kiri\Exception\{InitException};
|
||||||
|
use Psr\Container\ContainerInterface;
|
||||||
use Kiri\Server\{Server};
|
use Kiri\Server\{Server};
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
@@ -41,7 +42,7 @@ abstract class BaseApplication extends Component
|
|||||||
*
|
*
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct(public ContainerInterface $container)
|
||||||
{
|
{
|
||||||
Kiri::init($this);
|
Kiri::init($this);
|
||||||
$config = sweep(APP_PATH . '/config');
|
$config = sweep(APP_PATH . '/config');
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ use Psr\Container\NotFoundExceptionInterface;
|
|||||||
/**
|
/**
|
||||||
* Class Component
|
* Class Component
|
||||||
* @package Kiri\Base
|
* @package Kiri\Base
|
||||||
* @property EventDispatch $eventDispatch
|
|
||||||
* @property EventProvider $eventProvider
|
|
||||||
* @property Container $container
|
|
||||||
*/
|
*/
|
||||||
class Component implements Configure
|
class Component implements Configure
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ class Application extends BaseApplication
|
|||||||
{
|
{
|
||||||
fire(new OnBeforeCommandExecute());
|
fire(new OnBeforeCommandExecute());
|
||||||
|
|
||||||
$this->getContainer()->setBindings(OutputInterface::class, $output);
|
$this->container->setBindings(OutputInterface::class, $output);
|
||||||
|
|
||||||
if (!($class instanceof HotReload)) {
|
if (!($class instanceof HotReload)) {
|
||||||
scan_directory(MODEL_PATH, 'app\Model');
|
scan_directory(MODEL_PATH, 'app\Model');
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ use Kiri;
|
|||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
use Kiri\Abstracts\Config;
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Context;
|
use Kiri\Context;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
use Swoole\Error;
|
use Swoole\Error;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
@@ -24,17 +22,14 @@ class Connection extends Component
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
private Pool $pool;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @param Pool $pool
|
||||||
* @throws ContainerExceptionInterface
|
* @param array $config
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function __construct(public Pool $pool, array $config = [])
|
||||||
{
|
{
|
||||||
$this->pool = $this->getContainer()->get(Pool::class);
|
parent::__construct($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user