PHP Class Zend\Stratigility\Http\Request

Decorates the PSR incoming request interface to add the ability to manipulate arbitrary instance members.
Deprecation: since 1.3.0; to be removed with 2.0.0. Track the original request via a request attribute or via a service instead; you can use Zend\Stratigility\Middleware\OriginalMessages to do so.
Inheritance: implements Psr\Http\Message\ServerRequestInterface
显示文件 Open project: zendframework/zend-stratigility Class Usage Examples

Public Methods

Method Description
__construct ( Psr\Http\Message\ServerRequestInterface $decoratedRequest, Psr\Http\Message\ServerRequestInterface $originalRequest = null )
getAttribute ( $attribute, $default = null ) Proxy to ServerRequestInterface::getAttribute()
getAttributes ( ) Proxy to ServerRequestInterface::getAttributes()
getBody ( ) Proxy to ServerRequestInterface::getBody()
getCookieParams ( ) Proxy to ServerRequestInterface::getCookieParams()
getCurrentRequest ( ) : Psr\Http\Message\ServerRequestInterface Return the currently decorated PSR request instance
getHeader ( $header ) Proxy to ServerRequestInterface::getHeader()
getHeaderLine ( $header ) Proxy to ServerRequestInterface::getHeaderLine()
getHeaders ( ) Proxy to ServerRequestInterface::getHeaders()
getMethod ( ) Proxy to ServerRequestInterface::getMethod()
getOriginalRequest ( ) : Psr\Http\Message\ServerRequestInterface Return the original PSR request instance
getParsedBody ( ) Proxy to ServerRequestInterface::getParsedBody()
getProtocolVersion ( ) Proxy to ServerRequestInterface::getProtocolVersion()
getQueryParams ( ) Proxy to ServerRequestInterface::getQueryParams()
getRequestTarget ( ) Proxy to ServerRequestInterface::getRequestTarget()
getServerParams ( ) Proxy to ServerRequestInterface::getServerParams()
getUploadedFiles ( ) Proxy to ServerRequestInterface::getFileParams()
getUri ( ) Proxy to ServerRequestInterface::getUri()
hasHeader ( $header ) Proxy to ServerRequestInterface::hasHeader()
withAddedHeader ( $header, $value ) Proxy to ServerRequestInterface::addHeader()
withAttribute ( $attribute, $value ) Proxy to ServerRequestInterface::withAttribute()
withBody ( Psr\Http\Message\StreamInterface $body ) Proxy to ServerRequestInterface::withBody()
withCookieParams ( array $cookies ) Proxy to ServerRequestInterface::withCookieParams()
withHeader ( $header, $value ) Proxy to ServerRequestInterface::withHeader()
withMethod ( $method ) Proxy to ServerRequestInterface::withMethod()
withParsedBody ( $params ) Proxy to ServerRequestInterface::withParsedBody()
withProtocolVersion ( $version ) Proxy to ServerRequestInterface::withProtocolVersion()
withQueryParams ( array $query ) Proxy to ServerRequestInterface::withQueryParams()
withRequestTarget ( $requestTarget ) Proxy to ServerRequestInterface::withRequestTarget()
withUploadedFiles ( array $uploadedFiles ) Proxy to ServerRequestInterface::getFileParams()
withUri ( Psr\Http\Message\UriInterface $uri, $preserveHost = false ) Allow mutating the URI
withoutAttribute ( $attribute ) Proxy to ServerRequestInterface::withoutAttribute()
withoutHeader ( $header ) Proxy to ServerRequestInterface::removeHeader()

Method Details

__construct() public method

public __construct ( Psr\Http\Message\ServerRequestInterface $decoratedRequest, Psr\Http\Message\ServerRequestInterface $originalRequest = null )
$decoratedRequest Psr\Http\Message\ServerRequestInterface
$originalRequest Psr\Http\Message\ServerRequestInterface

getAttribute() public method

public getAttribute ( $attribute, $default = null )

getAttributes() public method

public getAttributes ( )

getBody() public method

public getBody ( )

getCookieParams() public method

public getCookieParams ( )

getCurrentRequest() public method

Return the currently decorated PSR request instance
public getCurrentRequest ( ) : Psr\Http\Message\ServerRequestInterface
return Psr\Http\Message\ServerRequestInterface

getHeader() public method

public getHeader ( $header )

getHeaderLine() public method

public getHeaderLine ( $header )

getHeaders() public method

public getHeaders ( )

getMethod() public method

public getMethod ( )

getOriginalRequest() public method

Return the original PSR request instance
public getOriginalRequest ( ) : Psr\Http\Message\ServerRequestInterface
return Psr\Http\Message\ServerRequestInterface

getParsedBody() public method

public getParsedBody ( )

getProtocolVersion() public method

public getProtocolVersion ( )

getQueryParams() public method

public getQueryParams ( )

getRequestTarget() public method

public getRequestTarget ( )

getServerParams() public method

public getServerParams ( )

getUploadedFiles() public method

public getUploadedFiles ( )

getUri() public method

public getUri ( )

hasHeader() public method

public hasHeader ( $header )

withAddedHeader() public method

public withAddedHeader ( $header, $value )

withAttribute() public method

public withAttribute ( $attribute, $value )

withBody() public method

public withBody ( Psr\Http\Message\StreamInterface $body )
$body Psr\Http\Message\StreamInterface

withCookieParams() public method

public withCookieParams ( array $cookies )
$cookies array

withHeader() public method

public withHeader ( $header, $value )

withMethod() public method

public withMethod ( $method )

withParsedBody() public method

public withParsedBody ( $params )

withProtocolVersion() public method

public withProtocolVersion ( $version )

withQueryParams() public method

public withQueryParams ( array $query )
$query array

withRequestTarget() public method

public withRequestTarget ( $requestTarget )

withUploadedFiles() public method

public withUploadedFiles ( array $uploadedFiles )
$uploadedFiles array

withUri() public method

public withUri ( Psr\Http\Message\UriInterface $uri, $preserveHost = false )
$uri Psr\Http\Message\UriInterface

withoutAttribute() public method

public withoutAttribute ( $attribute )

withoutHeader() public method

public withoutHeader ( $header )