generated from Potter/Template
0.0.1
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
|
||||
|
||||
interface ParsedBodyInterface
|
||||
{
|
||||
public function getParsedBody();
|
||||
public function withParsedBody($data): PsrServerRequestInterface;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
|
||||
|
||||
interface RequestAttributeInterface
|
||||
{
|
||||
public function getAttributes(): array;
|
||||
public function getAttribute(string $name, $default = null);
|
||||
public function withAttribute(string $name, $value): PsrServerRequestInterface;
|
||||
public function withoutAttribute(string $name): PsrServerRequestInterface;
|
||||
}
|
||||
@@ -5,14 +5,7 @@ declare(strict_types=1);
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\RequestInterface as PsrRequestInterface;
|
||||
use \Psr\Http\Message\UriInterface as PsrUriInterface;
|
||||
|
||||
interface RequestInterface extends PsrRequestInterface
|
||||
{
|
||||
public function getRequestTarget(): string;
|
||||
public function withRequestTarget(string $requestTarget): PsrRequestInterface;
|
||||
public function getMethod(): string;
|
||||
public function withMethod(string $method): PsrRequestInterface;
|
||||
public function getUri(): PsrUriInterface;
|
||||
public function withUri(PsrUriInterface $uri, bool $preserveHost = false): PsrRequestInterface;
|
||||
}
|
||||
interface RequestInterface extends PsrRequestInterface,
|
||||
RequestMethodInterface, RequestTargetInterface, RequestUriInterface
|
||||
{ }
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\RequestInterface as PsrRequestInterface;
|
||||
|
||||
interface RequestMethodInterface
|
||||
{
|
||||
public function getMethod(): string;
|
||||
public function withMethod(string $method): PsrRequestInterface;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
|
||||
|
||||
interface RequestParameterInterface
|
||||
{
|
||||
public function getServerParams(): array;
|
||||
public function getCookieParams(): array;
|
||||
public function withCookieParams(array $cookies): PsrServerRequestInterface;
|
||||
public function getQueryParams(): array;
|
||||
public function withQueryParams(array $query): PsrServerRequestInterface;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\RequestInterface as PsrRequestInterface;
|
||||
|
||||
interface RequestTargetInterface
|
||||
{
|
||||
public function getRequestTarget(): string;
|
||||
public function withRequestTarget(string $requestTarget): PsrRequestInterface;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
|
||||
|
||||
interface RequestUploadInterface
|
||||
{
|
||||
public function getUploadedFiles(): array;
|
||||
public function withUploadedFiles(array $uploadedFiles): PsrServerRequestInterface;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\RequestInterface as PsrRequestInterface;
|
||||
|
||||
interface RequestUriInterface
|
||||
{
|
||||
public function getUri(): PsrUriInterface;
|
||||
public function withUri(PsrUriInterface $uri, bool $preserveHost = false): PsrRequestInterface;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Request;
|
||||
|
||||
use \Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
|
||||
|
||||
interface ServerRequestInterface extends PsrServerRequestInterface,
|
||||
RequestInterface, RequestAttributeInterface,
|
||||
RequestParameterInterface, RequestUploadInterface,
|
||||
ParsedBodyInterface
|
||||
{ }
|
||||
Reference in New Issue
Block a user