This commit is contained in:
xl
2023-05-26 16:54:27 +08:00
parent 606cf4e154
commit 45af402e9d
2 changed files with 1159 additions and 1139 deletions
+10
View File
@@ -247,6 +247,16 @@ class ConstrictRequest extends Message implements RequestInterface, ServerReques
} }
/**
* @param string $key
* @return string|int|float|null
*/
public function getServerParam(string $key): string|int|float|null
{
return $this->serverParams[$key] ?? null;
}
/** /**
* Return an instance with the specified cookies. * Return an instance with the specified cookies.
* *
+10
View File
@@ -99,6 +99,16 @@ class Request implements ServerRequestInterface
return $this->__call__(__FUNCTION__); return $this->__call__(__FUNCTION__);
} }
/**
* @param string $key
* @return string|int|float|null
*/
public function getServerParam(string $key): string|int|float|null
{
return $this->__call__(__FUNCTION__)($key);
}
/** /**
* Return an instance with the specified HTTP protocol version. * Return an instance with the specified HTTP protocol version.
* *