package Default

 Methods

Can we send headers?

canSendHeaders(boolean $throw = false) : \Zend\Feed\PubSubHubbub\HttpResponse

Parameters

$throw

boolean

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

Exceptions

\Zend\Feed\PubSubHubbub\Exception\RuntimeException

Returns

\Zend\Feed\PubSubHubbub\HttpResponse

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() : integer

Returns

integer

Send the response, including all headers

send() : void

Send all headers

sendHeaders() : void

Sends any headers specified. If an \setHttpResponseCode() has been specified, it is sent with the first header.

Set body content

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

Parameters

$content

string

Returns

\Zend\Feed\PubSubHubbub\HttpResponse

Set a header

setHeader(string $name, string $value, boolean $replace = false) : \Zend\Feed\PubSubHubbub\HttpResponse

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

Parameters

$name

string

$value

string

$replace

boolean

Returns

\Zend\Feed\PubSubHubbub\HttpResponse

Set HTTP response code to use with headers

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

Parameters

$code

integer

Exceptions

\Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException

Returns

\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

Default

''
 

Array of headers. Each header is an array with keys 'name' and 'value'

$headers : array

Default

array()
 

HTTP response code to use in headers

$statusCode : integer

Default

200