This commit is contained in:
as2252258@163.com
2021-08-06 00:50:50 +08:00
parent d8cec79b3e
commit 4a130e6eed
-42
View File
@@ -18,8 +18,6 @@ use Snowflake\Snowflake;
* Class WebController
* @package Snowflake\Snowflake\Web
* @property Application $container
* @property HttpParams $input
* @property HttpHeaders $header
*/
class Controller
{
@@ -54,45 +52,5 @@ class Controller
public ?CrResponse $response = null;
/**
* @return \Snowflake\Application|null
*/
protected function getContainer()
{
return Snowflake::app();
}
/**
* @return \HttpServer\Http\HttpParams|null
*/
private function getInput()
{
return $this->request->params;
}
/**
* @return \HttpServer\Http\HttpHeaders|null
*/
private function getHeader()
{
return $this->request->headers;
}
/**
* @param $name
* @return \Snowflake\Application|null
*/
public function __get($name)
{
$method = 'get' . ucfirst($name);
if (method_exists($this, $method)) {
return $this->{$method}();
}
return $this->{$name} ?? null;
}
}