改名
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Server\Message;
|
||||
|
||||
use BadMethodCallException;
|
||||
use Http\IInterface\AuthIdentity;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@@ -37,6 +38,13 @@ class Request implements RequestInterface
|
||||
private array $files = [];
|
||||
|
||||
|
||||
/**
|
||||
* @var AuthIdentity|null
|
||||
*/
|
||||
public ?AuthIdentity $authority = null;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@@ -46,6 +54,15 @@ class Request implements RequestInterface
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param AuthIdentity $authority
|
||||
*/
|
||||
public function setAuthority(AuthIdentity $authority)
|
||||
{
|
||||
$this->authority = $authority;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param \Swoole\Http\Request $request
|
||||
* @return RequestInterface
|
||||
|
||||
@@ -35,9 +35,6 @@ class Uri implements UriInterface
|
||||
private array $_explode = [];
|
||||
|
||||
|
||||
private mixed $authority;
|
||||
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
@@ -65,19 +62,12 @@ class Uri implements UriInterface
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAuthority(): mixed
|
||||
public function getAuthority(): string
|
||||
{
|
||||
return $this->authority;
|
||||
throw new \BadMethodCallException('');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $authority
|
||||
*/
|
||||
public function setAuthority($authority)
|
||||
{
|
||||
$this->authority = $authority;
|
||||
}
|
||||
|
||||
|
||||
public function getUserInfo()
|
||||
|
||||
Reference in New Issue
Block a user