generated from Potter/Template
0.0.1
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Message;
|
||||||
|
|
||||||
|
use \Psr\Http\Message\{
|
||||||
|
MessageInterface as PsrMessageInterface,
|
||||||
|
StreamInterface as PsrStreamInterface};
|
||||||
|
|
||||||
|
interface MessageBodyInterface
|
||||||
|
{
|
||||||
|
public function getBody(): PsrStreamInterface;
|
||||||
|
public function withBody(StreamInterface $body): PsrMessageInterface;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Message;
|
||||||
|
|
||||||
|
use \Psr\Http\Message\MessageInterface as PsrMessageInterface;
|
||||||
|
|
||||||
|
interface MessageHeaderInterface
|
||||||
|
{
|
||||||
|
public function getHeaders(): array;
|
||||||
|
public function hasHeader(string $name): bool;
|
||||||
|
public function getHeader(string $name): array;
|
||||||
|
public function getHeaderLine(string $name): string;
|
||||||
|
public function withHeader(string $name, $value): PsrMessageInterface;
|
||||||
|
public function withAddedHeader(string $name, $value): PsrMessageInterface;
|
||||||
|
public function withoutHeader(string $name): PsrMessageInterface;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Message;
|
||||||
|
|
||||||
|
use \Psr\Http\Message\MessageInterface as PsrMessageInterface;
|
||||||
|
|
||||||
|
interface MessageInterface extends PsrMessageInterface,
|
||||||
|
MessageProtocolInterface, MessageHeaderInterface, MessageBodyInterface
|
||||||
|
{ }
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Message;
|
||||||
|
|
||||||
|
use \Psr\Http\Message\MessageInterface as PsrMessageInterface;
|
||||||
|
|
||||||
|
interface MessageProtocolInterface
|
||||||
|
{
|
||||||
|
public function getProtocolVersion(): string;
|
||||||
|
public function withProtocolVersion(string $version): PsrMessageInterface;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user