This commit is contained in:
2023-04-16 16:06:28 +08:00
parent eda6f4073e
commit 2d41c2d46a
2 changed files with 47 additions and 0 deletions
+26
View File
@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace Kiri\Router\Constrict;
use Kiri\Router\Base\AuthorizationInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UriInterface;
@@ -33,6 +34,31 @@ class ConstrictRequest extends Message implements RequestInterface, ServerReques
private array $serverParams = [];
/**
* @var AuthorizationInterface|null
*/
private ?AuthorizationInterface $authorization = null;
/**
* @return AuthorizationInterface|null
*/
public function getAuthority(): ?AuthorizationInterface
{
return $this->authorization;
}
/**
* @param AuthorizationInterface $authorization
* @return RequestInterface
*/
public function withAuthority(AuthorizationInterface $authorization): RequestInterface
{
$this->authorization = $authorization;
return $this;
}
/**
* @return bool
*/