Methods

Can we send headers?

canSendHeaders(bool $throw) : \Zend\Feed\PubSubHubbub\HttpResponse

Parameters

$throw

bool

Whether or not to throw an exception if headers have been sent; defaults to false

Exceptions

\Zend\Feed\PubSubHubbub\Exception\RuntimeException

Returns

Return the body content

getContent() : string

Returns

string

Check if a specific Header is set and return its value

getHeader(string $name) : string | null

Parameters

$name

string

Returns

stringnull

Return array of headers; see {@link $headers} for format

getHeaders() : array

Returns

array

Retrieve HTTP response code

getStatusCode() : int

Returns

int

Send the response, including all headers

send() : void

Send all headers

sendHeaders() : void

Sends any headers specified. If an HTTP response code has been specified, it is sent with the first header.

Set body content

setContent(string $content) : \Zend\Feed\PubSubHubbub\HttpResponse

Parameters

$content

string

Returns

Set a header

setHeader(string $name, string $value, bool $replace) : \Zend\Feed\PubSubHubbub\HttpResponse

If $replace is true, replaces any headers already defined with that $name.

Parameters

$name

string

$value

string

$replace

bool

Returns

Set HTTP response code to use with headers

setStatusCode(int $code) : \Zend\Feed\PubSubHubbub\HttpResponse

Normalizes a header name to X-Capitalized-Names

_normalizeHeader(string $name) : string

Parameters

$name

string

Returns

string

 Properties

 

The body of any response to the current callback request

$content : string

 

Array of headers.

$headers : array

Each header is an array with keys 'name' and 'value'

 

HTTP response code to use in headers

$statusCode : int