This commit is contained in:
2021-08-02 16:38:50 +08:00
parent fd7415b7f1
commit a095c94e21
15 changed files with 1593 additions and 1513 deletions
+35 -25
View File
@@ -10,6 +10,7 @@ use HttpServer\Http\HttpParams;
use HttpServer\Http\Request;
use HttpServer\Http\Response;
use Snowflake\Abstracts\TraitApplication;
use Snowflake\Application;
/**
* Class WebController
@@ -18,39 +19,48 @@ use Snowflake\Abstracts\TraitApplication;
class Controller
{
use TraitApplication;
use TraitApplication;
/**
* inject request
*
* @var Request|null
*/
#[Inject('request')]
public ?Request $request = null;
/**
* @param Application $container
*/
public function __construct(protected Application $container)
{
}
/**
* @var HttpParams|null
*/
#[Inject('input')]
public ?HttpParams $input = null;
/**
* inject request
*
* @var Request|null
*/
#[Inject('request')]
public ?Request $request = null;
/**
* @var HttpHeaders|null
*/
#[Inject('header')]
public ?HttpHeaders $header = null;
/**
* @var HttpParams|null
*/
#[Inject('input')]
public ?HttpParams $input = null;
/**
* inject response
*
* @var Response|null
*/
#[Inject('response')]
public ?Response $response = null;
/**
* @var HttpHeaders|null
*/
#[Inject('header')]
public ?HttpHeaders $header = null;
/**
* inject response
*
* @var Response|null
*/
#[Inject('response')]
public ?Response $response = null;
}