eee
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Kiri\Abstracts;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Kiri;
|
use Kiri;
|
||||||
|
use Kiri\Error\StdoutLogger;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,10 +50,10 @@ class Component implements Configure
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Kiri\Error\StdoutLogger
|
* @return StdoutLogger
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function getLogger(): Kiri\Error\StdoutLogger
|
public function getLogger(): StdoutLogger
|
||||||
{
|
{
|
||||||
return Kiri::getLogger();
|
return Kiri::getLogger();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,9 @@ use Symfony\Component\Console\{Application as ConsoleApplication,
|
|||||||
Exception\ExceptionInterface,
|
Exception\ExceptionInterface,
|
||||||
Input\ArgvInput,
|
Input\ArgvInput,
|
||||||
Output\ConsoleOutput,
|
Output\ConsoleOutput,
|
||||||
Output\OutputInterface};
|
Output\OutputInterface
|
||||||
use Kiri\Server\Events\OnWorkerStart;
|
};
|
||||||
|
use Kiri\Di\Inject\Container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Init
|
* Class Init
|
||||||
@@ -44,12 +45,10 @@ class Application extends BaseApplication
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ErrorHandler $errorHandler
|
* @var ErrorHandler
|
||||||
*/
|
*/
|
||||||
public function __construct(public ErrorHandler $errorHandler)
|
#[Container(ErrorHandler::class)]
|
||||||
{
|
public ErrorHandler $errorHandler;
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -163,5 +162,5 @@ class Application extends BaseApplication
|
|||||||
fire(new OnAfterCommandExecute($command));
|
fire(new OnAfterCommandExecute($command));
|
||||||
$output->writeln('execute complete.' . PHP_EOL);
|
$output->writeln('execute complete.' . PHP_EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ use ErrorException;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Kiri\Di\Inject\Container;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Kiri\Events\OnSystemError;
|
use Kiri\Events\OnSystemError;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
@@ -37,12 +36,10 @@ class ErrorHandler extends Component implements ErrorInterface
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ContainerInterface $container
|
* @var ContainerInterface
|
||||||
*/
|
*/
|
||||||
public function __construct(public ContainerInterface $container)
|
#[Container(ContainerInterface::class)]
|
||||||
{
|
public ContainerInterface $container;
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user