This commit is contained in:
2023-08-16 12:15:59 +08:00
parent 5f5b90ac49
commit 68035a95e4
+10 -3
View File
@@ -23,10 +23,12 @@ use Kiri\Di\Context;
use Kiri\Pool\Pool; use Kiri\Pool\Pool;
use Kiri\Events\EventProvider; use Kiri\Events\EventProvider;
use Kiri\Exception\NotFindClassException; use Kiri\Exception\NotFindClassException;
use Monolog\Logger;
use PDO; use PDO;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use ReflectionException; use ReflectionException;
use Kiri\Server\Events\OnAfterRequest; use Kiri\Server\Events\OnAfterRequest;
use Kiri\Di\Inject\Container;
/** /**
* Class Connection * Class Connection
@@ -80,10 +82,15 @@ class Connection extends Component
/** /**
* @param Pool $connections * @var Logger
* @param LoggerInterface $logger
*/ */
public function __construct(public Pool $connections, public LoggerInterface $logger) #[Container(LoggerInterface::class)]
protected Logger $logger;
/**
* @param Pool $connections
*/
public function __construct(public Pool $connections)
{ {
parent::__construct(); parent::__construct();
} }