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