Controller/Request/HttpTestCase.php

Show: PublicProtectedPrivateinherited
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 [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Controller  
Version
$Id$  

\Zend_Controller_Request_HttpTestCase

Package: Zend_Controller\Request
Zend_Controller_Request_HttpTestCase
HTTP request object for use with Zend_Controller family.
Parent(s)
\Zend_Controller_Request_Http < \Zend_Controller_Request_Abstract
Uses
 

Properties

>VPropertyprotectedarray $_headers = array()
Request headers
Default valuearray()Details
Type
array
>VPropertyprotectedstring $_method = 'GET'
Request method
Default value'GET'Details
Type
string
>VPropertyprotectedstring|null $_rawBody
Raw POST body
Details
Type
string | null
>VPropertyprotectedarray $_validMethodTypes = array('DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT')
Valid request method types
Default valuearray('DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT')Details
Type
array

Methods

methodprotected_normalizeHeaderName(string $name) : string

Normalize a header name for setting and retrieval

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
string
methodpublicclearCookies() : \Zend_Controller_Request_HttpTestCase

Clear all cookies

methodpublicclearHeaders() : \Zend_Controller_Request_HttpTestCase

Clear request headers

methodpublicclearPost() : \Zend_Controller_Request_HttpTestCase

Clear POST values

methodpublicclearQuery() : \Zend_Controller_Request_HttpTestCase

Clear GET values

methodpublicclearRawBody() : \Zend_Controller_Request_HttpTestCase

Clear raw POST body

methodpublicgetHeader(string $header, mixed $default = null) : string | null

Get request header

Parameters
NameTypeDescription
$headerstring
$defaultmixed
Returns
TypeDescription
string | null
methodpublicgetHeaders() : array

Get all request headers

Returns
TypeDescription
array
methodpublicgetMethod() : string | null

Get request method

Returns
TypeDescription
string | null
methodpublicgetRawBody() : string | null

Get RAW POST body

Returns
TypeDescription
string | null
methodpublicgetRequestUri() : null | string

Get REQUEST_URI

Returns
TypeDescription
null | string
methodpublicsetCookie(string $key, mixed $value) : \Zend_Controller_Request_HttpTestCase

Set a cookie

Parameters
NameTypeDescription
$keystring
$valuemixed
Returns
TypeDescription
\Zend_Controller_Request_HttpTestCase
methodpublicsetCookies(array $cookies) : void

Set multiple cookies at once

Parameters
NameTypeDescription
$cookiesarray
methodpublicsetHeader(string $key, string $value) : \Zend_Controller_Request_HttpTestCase

Set a request header

Parameters
NameTypeDescription
$keystring
$valuestring
Returns
TypeDescription
\Zend_Controller_Request_HttpTestCase
methodpublicsetHeaders(array $headers) : \Zend_Controller_Request_HttpTestCase

Set request headers

Parameters
NameTypeDescription
$headersarray
Returns
TypeDescription
\Zend_Controller_Request_HttpTestCase
methodpublicsetMethod(string $type) : \Zend_Controller_Request_HttpTestCase

Set request method

Parameters
NameTypeDescription
$typestring
Returns
TypeDescription
\Zend_Controller_Request_HttpTestCase
methodpublicsetRawBody(string $content) : \Zend_Controller_Request_HttpTestCase

Set raw POST body

Parameters
NameTypeDescription
$contentstring
Returns
TypeDescription
\Zend_Controller_Request_HttpTestCase
Documentation was generated by phpDocumentor 2.2.0 .