Files
kiri-core/http-handler/Controller.php
T

62 lines
983 B
PHP
Raw Normal View History

2020-08-31 01:27:08 +08:00
<?php
2020-10-29 18:17:25 +08:00
declare(strict_types=1);
2020-08-31 01:27:08 +08:00
2021-09-18 16:56:13 +08:00
namespace Http\Handler;
2020-08-31 01:27:08 +08:00
2021-07-27 00:35:50 +08:00
use Annotation\Inject;
2021-08-17 16:23:49 +08:00
use JetBrains\PhpStorm\Pure;
2021-08-11 01:04:57 +08:00
use Kiri\Application;
2021-08-17 16:23:49 +08:00
use Kiri\Di\ContainerInterface;
2021-08-24 19:11:14 +08:00
use Psr\Log\LoggerInterface;
2021-09-10 10:45:24 +08:00
use Server\Constrict\RequestInterface;
use Server\Constrict\ResponseInterface;
2020-08-31 01:27:08 +08:00
/**
* Class WebController
2021-08-11 01:04:57 +08:00
* @package Kiri\Kiri\Web
2020-08-31 01:27:08 +08:00
*/
2021-07-27 00:35:50 +08:00
class Controller
2020-08-31 01:27:08 +08:00
{
2021-08-06 00:44:29 +08:00
2021-08-17 16:23:49 +08:00
/**
* inject di container
*
* @var ContainerInterface|null
*/
#[Inject(ContainerInterface::class)]
public ?ContainerInterface $container = null;
2021-08-06 00:44:29 +08:00
/**
* inject request
*
2021-08-13 16:53:24 +08:00
* @var RequestInterface|null
2021-08-06 00:44:29 +08:00
*/
2021-08-13 16:53:24 +08:00
#[Inject(RequestInterface::class)]
public ?RequestInterface $request = null;
2021-08-06 00:44:29 +08:00
/**
* inject response
*
2021-08-13 16:53:24 +08:00
* @var ResponseInterface|null
2021-08-06 00:44:29 +08:00
*/
2021-08-13 16:53:24 +08:00
#[Inject(ResponseInterface::class)]
public ?ResponseInterface $response = null;
2021-08-06 00:44:29 +08:00
2020-11-10 18:04:42 +08:00
2021-08-24 19:11:14 +08:00
/**
* inject logger
*
* @var LoggerInterface
*/
#[Inject(LoggerInterface::class)]
public LoggerInterface $logger;
2020-08-31 01:27:08 +08:00
}