Feed/Pubsubhubbub/HttpResponse.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Feed_Pubsubhubbub
- Version
- $Id: HttpResponse.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Feed_Pubsubhubbub_HttpResponse
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

string $_body = ''The body of any response to the current callback request
''Details- Type
- string

array $_headers = array()Array of headers.
Each header is an array with keys 'name' and 'value'
array()Details- Type
- array
Methods

_normalizeHeader(string $name) : stringNormalizes a header name to X-Capitalized-Names
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| string |

canSendHeaders(boolean $throw = false) : booleanCan we send headers?
| Name | Type | Description |
|---|---|---|
| $throw | boolean | Whether or not to throw an exception if headers have been sent; defaults to false |
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \Zend_Feed_Pubsubhubbub_Exception |

getHeader(string $name) : string | nullCheck if a specific Header is set and return its value
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| string | null |

getHeaders() : arrayReturn array of headers; see {@link $_headers} for format
| Type | Description |
|---|---|
| array |

sendHeaders() : voidSend all headers
Sends any headers specified. If an HTTP response code has been specified, it is sent with the first header.

setBody(string $content) : \Zend_Feed_Pubsubhubbub_HttpResponseSet body content
| Name | Type | Description |
|---|---|---|
| $content | string |
| Type | Description |
|---|---|
| \Zend_Feed_Pubsubhubbub_HttpResponse |

setHeader(string $name, string $value, boolean $replace = false) : \Zend_Feed_Pubsubhubbub_HttpResponseSet a header
If $replace is true, replaces any headers already defined with that $name.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | string | |
| $replace | boolean |
| Type | Description |
|---|---|
| \Zend_Feed_Pubsubhubbub_HttpResponse |

setHttpResponseCode(int $code) : \Zend_Feed_Pubsubhubbub_HttpResponseSet HTTP response code to use with headers
| Name | Type | Description |
|---|---|---|
| $code | int |
| Type | Description |
|---|---|
| \Zend_Feed_Pubsubhubbub_HttpResponse |