Zend Framework  3.0
Public Member Functions | List of all members
HeaderAwareResponseInterface Interface Reference

Public Member Functions

 getHeaderLine ($name, $default=null)
 Retrieve a header (as a single line) from the response.
 
- Public Member Functions inherited from ResponseInterface
 getBody ()
 Retrieve the response body.
 
 getStatusCode ()
 Retrieve the HTTP response status code.
 

Member Function Documentation

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

Implemented in Response, and Psr7ResponseDecorator.