This commit is contained in:
2021-09-09 17:01:52 +08:00
parent 3a0f2f2882
commit 46822da6d7
4 changed files with 97 additions and 0 deletions
+27
View File
@@ -405,4 +405,31 @@ class Request implements RequestInterface
{
return $this->__call__()->{__FUNCTION__}();
}
/**
* @return string|null
*/
public function getAccessControlAllowOrigin(): ?string
{
return $this->__call__()->{__FUNCTION__}();
}
/**
* @return string|null
*/
public function getAccessControlAllowHeaders(): ?string
{
return $this->__call__()->{__FUNCTION__}();
}
/**
* @return string|null
*/
public function getAccessControlRequestMethod(): ?string
{
return $this->__call__()->{__FUNCTION__}();
}
}
+28
View File
@@ -5,6 +5,7 @@ namespace Server\Constrict;
use Http\Context\Context;
use JetBrains\PhpStorm\Pure;
use Psr\Http\Message\StreamInterface;
use Server\Message\Response as Psr7Response;
use Server\ResponseInterface;
@@ -279,4 +280,31 @@ class Response implements ResponseInterface
{
return $this->__call__()->{__FUNCTION__}($value);
}
/**
* @return string|null
*/
public function getAccessControlAllowOrigin(): ?string
{
return $this->__call__()->{__FUNCTION__}();
}
/**
* @return string|null
*/
public function getAccessControlAllowHeaders(): ?string
{
return $this->__call__()->{__FUNCTION__}();
}
/**
* @return string|null
*/
public function getAccessControlRequestMethod(): ?string
{
return $this->__call__()->{__FUNCTION__}();
}
}
+20
View File
@@ -132,4 +132,24 @@ interface RequestInterface extends \Psr\Http\Message\RequestInterface
* @return int
*/
public function getClientId(): int;
/**
* @return string|null
*/
#[Pure] public function getAccessControlAllowOrigin(): ?string;
/**
* @return string|null
*/
#[Pure] public function getAccessControlAllowHeaders(): ?string;
/**
* @return string|null
*/
#[Pure] public function getAccessControlRequestMethod(): ?string;
}
+22
View File
@@ -3,6 +3,7 @@
namespace Server;
use JetBrains\PhpStorm\Pure;
use Server\Message\Response;
use Server\SInterface\DownloadInterface;
@@ -87,4 +88,25 @@ interface ResponseInterface extends \Psr\Http\Message\ResponseInterface
*/
public function withAccessControlAllowHeaders(string $value): ResponseInterface;
/**
* @return string|null
*/
#[Pure] public function getAccessControlAllowOrigin(): ?string;
/**
* @return string|null
*/
#[Pure] public function getAccessControlAllowHeaders(): ?string;
/**
* @return string|null
*/
#[Pure] public function getAccessControlRequestMethod(): ?string;
}