API Documentation

Zend/Feed/Pubsubhubbub/HttpResponse.php

Show: inherited
Table of Contents

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 license@zend.com 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 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Feed_Pubsubhubbub_HttpResponse

Package: Zend\Feed\Pubsubhubbub

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedstring  $_body= ''''

The body of any response to the current callback request

Default value''Details
Type
string
Propertyprotectedarray  $_headers= 'array()'

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

Default valuearray()Details
Type
array
Propertyprotectedint  $_httpResponseCode= '200'

HTTP response code to use in headers

Default value200Details
Type
int

Methods

methodprotected_normalizeHeader( string $name ) : string

Normalizes a header name to X-Capitalized-Names

Parameters
Name Type Description
$name string
Returns
Type Description
string
methodpubliccanSendHeaders( boolean $throw = false ) : boolean

Can we send headers?

Parameters
Name Type Description
$throw boolean

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

Returns
Type Description
boolean
Throws
Exception Description
\Zend_Feed_Pubsubhubbub_Exception
methodpublicgetBody( ) : string

Return the body content

Returns
Type Description
string
methodpublicgetHeader( string $name ) : string|null

Check if a specific Header is set and return its value

Parameters
Name Type Description
$name string
Returns
Type Description
string|null
methodpublicgetHeaders( ) : array

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

Returns
Type Description
array
methodpublicgetHttpResponseCode( ) : int

Retrieve HTTP response code

Returns
Type Description
int
methodpublicsendHeaders( ) : void

Send all headers

Sends any headers specified. If an {@link setHttpResponseCode() HTTP response code} has been specified, it is sent with the first header.

methodpublicsendResponse( ) : void

Send the response, including all headers

methodpublicsetBody( string $content ) : \Zend_Feed_Pubsubhubbub_HttpResponse

Set body content

Parameters
Name Type Description
$content string
Returns
Type Description
\Zend_Feed_Pubsubhubbub_HttpResponse
methodpublicsetHeader( string $name, string $value, boolean $replace = false ) : \Zend_Feed_Pubsubhubbub_HttpResponse

Set a header

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

Parameters
Name Type Description
$name string
$value string
$replace boolean
Returns
Type Description
\Zend_Feed_Pubsubhubbub_HttpResponse
methodpublicsetHttpResponseCode( int $code ) : \Zend_Feed_Pubsubhubbub_HttpResponse

Set HTTP response code to use with headers

Parameters
Name Type Description
$code int
Returns
Type Description
\Zend_Feed_Pubsubhubbub_HttpResponse
Documentation was generated by DocBlox 0.15.1.