This commit is contained in:
2021-09-10 11:09:33 +08:00
parent efbf2075f4
commit 16ad6757d4
3 changed files with 31 additions and 29 deletions
+27
View File
@@ -3,6 +3,7 @@
namespace Protocol\Message;
use JetBrains\PhpStorm\Pure;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;
@@ -30,6 +31,13 @@ trait Message
protected array $headers = [];
/**
* @var array|null
*/
protected ?array $cookieParams = [];
/**
* @return string
*/
@@ -172,6 +180,25 @@ trait Message
}
/**
* @return null|array
*/
public function getCookieParams(): ?array
{
return $this->cookieParams;
}
/**
* @param array|null $cookies
* @return static
*/
public function withCookieParams(?array $cookies): static
{
$this->cookieParams = $cookies;
return $this;
}
/**
* @return StreamInterface
*/