Zend Framework  3.0
Public Member Functions | List of all members
Psr7ResponseDecorator Class Reference

ResponseInterface wrapper for a PSR-7 response. More...

Public Member Functions

 __construct (Psr7ResponseInterface $response)
 
 getDecoratedResponse ()
 Return the original PSR-7 response being decorated.
 
 getBody ()
 Retrieve the response body.
Returns
string

 
 getStatusCode ()
 Retrieve the HTTP response status code.
Returns
int

 
 getHeaderLine ($name, $default=null)
 Retrieve a header (as a single line) from the response.Header name lookups MUST be case insensitive.Since the only header values the feed reader consumes are singular in nature, this method is expected to return a string, and not an array of values.
Parameters
string$nameHeader name to retrieve.
mixed$defaultDefault value to use if header is not present.
Returns
string

 

Detailed Description

ResponseInterface wrapper for a PSR-7 response.

Constructor & Destructor Documentation

__construct ( Psr7ResponseInterface  $response)
Parameters
Psr7ResponseInterface$response

Member Function Documentation

getBody ( )

Retrieve the response body.

Returns
string

Implements ResponseInterface.

getDecoratedResponse ( )

Return the original PSR-7 response being decorated.

Returns
Psr7ResponseInterface
getHeaderLine (   $name,
  $default = null 
)

Retrieve a header (as a single line) from the response.Header name lookups MUST be case insensitive.Since the only header values the feed reader consumes are singular in nature, this method is expected to return a string, and not an array of values.

Parameters
string$nameHeader name to retrieve.
mixed$defaultDefault value to use if header is not present.
Returns
string

Implements HeaderAwareResponseInterface.

getStatusCode ( )

Retrieve the HTTP response status code.

Returns
int

Implements ResponseInterface.