Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Controller_Request_HttpTestCase Class Reference

Public Member Functions

 clearQuery ()
 Clear GET values.
 
 clearPost ()
 Clear POST values.
 
 setRawBody ($content)
 Set raw POST body.
 
 getRawBody ()
 Get RAW POST body.
 
 clearRawBody ()
 Clear raw POST body.
 
 setCookie ($key, $value)
 Set a cookie.
 
 setCookies (array $cookies)
 Set multiple cookies at once.
 
 clearCookies ()
 Clear all cookies.
 
 setMethod ($type)
 Set request method.
 
 getMethod ()
 Get request method.
 
 setHeader ($key, $value)
 Set a request header.
 
 setHeaders (array $headers)
 Set request headers.
 
 getHeader ($header, $default=null)
 Get request header.
 
 getHeaders ()
 Get all request headers.
 
 clearHeaders ()
 Clear request headers.
 
 getRequestUri ()
 Get REQUEST_URI.
 
- Public Member Functions inherited from Zend_Controller_Request_Http
 __construct ($uri=null)
 Constructor.
 
 __get ($key)
 Access values contained in the superglobals as public members Order of precedence: 1.
 
 get ($key)
 Alias to __get.
 
 __set ($key, $value)
 Set values.
 
 set ($key, $value)
 Alias to __set()
 
 __isset ($key)
 Check to see if a property is set.
 
 has ($key)
 Alias to __isset()
 
 setQuery ($spec, $value=null)
 Set GET values.
 
 getQuery ($key=null, $default=null)
 Retrieve a member of the $_GET superglobal.
 
 setPost ($spec, $value=null)
 Set POST values.
 
 getPost ($key=null, $default=null)
 Retrieve a member of the $_POST superglobal.
 
 getCookie ($key=null, $default=null)
 Retrieve a member of the $_COOKIE superglobal.
 
 getServer ($key=null, $default=null)
 Retrieve a member of the $_SERVER superglobal.
 
 getEnv ($key=null, $default=null)
 Retrieve a member of the $_ENV superglobal.
 
 setRequestUri ($requestUri=null)
 Set the REQUEST_URI on which the instance operates.
 
 getRequestUri ()
 Returns the REQUEST_URI taking into account platform differences between Apache and IIS.
 
 setBaseUrl ($baseUrl=null)
 Set the base URL of the request; i.e., the segment leading to the script name.
 
 getBaseUrl ($raw=false)
 Everything in REQUEST_URI before PATH_INFO <form action="<?=$baseUrl?>/news/submit" method="POST">
 
 setBasePath ($basePath=null)
 Set the base path for the URL.
 
 getBasePath ()
 Everything in REQUEST_URI before PATH_INFO not including the filename.
 
 setPathInfo ($pathInfo=null)
 Set the PATH_INFO string.
 
 getPathInfo ()
 Returns everything between the BaseUrl and QueryString.
 
 setParamSources (array $paramSources=array())
 Set allowed parameter sources.
 
 getParamSources ()
 Get list of allowed parameter sources.
 
 setParam ($key, $value)
 Set a userland parameter.
 
 getParam ($key, $default=null)
 Retrieve a parameter.
 
 getParams ()
 Retrieve an array of parameters.
 
 setParams (array $params)
 Set parameters.
 
 setAlias ($name, $target)
 Set a key alias.
 
 getAlias ($name)
 Retrieve an alias.
 
 getAliases ()
 Retrieve the list of all aliases.
 
 getMethod ()
 Return the method by which the request was made.
 
 isPost ()
 Was the request made by POST?
 
 isGet ()
 Was the request made by GET?
 
 isPut ()
 Was the request made by PUT?
 
 isDelete ()
 Was the request made by DELETE?
 
 isHead ()
 Was the request made by HEAD?
 
 isOptions ()
 Was the request made by OPTIONS?
 
 isXmlHttpRequest ()
 Is the request a Javascript XMLHttpRequest?
 
 isFlashRequest ()
 Is this a Flash request?
 
 isSecure ()
 Is https secure request.
 
 getRawBody ()
 Return the raw body of the request, if present.
 
 getHeader ($header)
 Return the value of the given HTTP header.
 
 getScheme ()
 Get the request URI scheme.
 
 getHttpHost ()
 Get the HTTP host.
 
 getClientIp ($checkProxy=true)
 Get the client's IP addres.
 
- Public Member Functions inherited from Zend_Controller_Request_Abstract
 getModuleName ()
 Retrieve the module name.
 
 setModuleName ($value)
 Set the module name to use.
 
 getControllerName ()
 Retrieve the controller name.
 
 setControllerName ($value)
 Set the controller name to use.
 
 getActionName ()
 Retrieve the action name.
 
 setActionName ($value)
 Set the action name.
 
 getModuleKey ()
 Retrieve the module key.
 
 setModuleKey ($key)
 Set the module key.
 
 getControllerKey ()
 Retrieve the controller key.
 
 setControllerKey ($key)
 Set the controller key.
 
 getActionKey ()
 Retrieve the action key.
 
 setActionKey ($key)
 Set the action key.
 
 getParam ($key, $default=null)
 Get an action parameter.
 
 getUserParams ()
 Retrieve only user params (i.e, any param specific to the object and not the environment)
 
 getUserParam ($key, $default=null)
 Retrieve a single user param (i.e, a param specific to the object and not the environment)
 
 setParam ($key, $value)
 Set an action parameter.
 
 getParams ()
 Get all action parameters.
 
 setParams (array $array)
 Set action parameters en masse; does not overwrite.
 
 clearParams ()
 Unset all user parameters.
 
 setDispatched ($flag=true)
 Set flag indicating whether or not request has been dispatched.
 
 isDispatched ()
 Determine if the request has been dispatched.
 

Protected Member Functions

 _normalizeHeaderName ($name)
 Normalize a header name for setting and retrieval.
 

Protected Attributes

 $_headers = array()
 
 $_method = 'GET'
 
 $_rawBody
 
 $_validMethodTypes
 
- Protected Attributes inherited from Zend_Controller_Request_Http
 $_paramSources = array('_GET', '_POST')
 
 $_requestUri
 
 $_baseUrl = null
 
 $_basePath = null
 
 $_pathInfo = ''
 
 $_params = array()
 
 $_rawBody
 
 $_aliases = array()
 
- Protected Attributes inherited from Zend_Controller_Request_Abstract
 $_dispatched = false
 
 $_module
 
 $_moduleKey = 'module'
 
 $_controller
 
 $_controllerKey = 'controller'
 
 $_action
 
 $_actionKey = 'action'
 
 $_params = array()
 

Additional Inherited Members

- Public Attributes inherited from Zend_Controller_Request_Http
const SCHEME_HTTP = 'http'
 Scheme for http.
 
const SCHEME_HTTPS = 'https'
 Scheme for https.
 

Member Function Documentation

_normalizeHeaderName (   $name)
protected

Normalize a header name for setting and retrieval.

Parameters
string$name
Returns
string
clearCookies ( )

Clear all cookies.

Returns
Zend_Controller_Request_HttpTestCase
clearHeaders ( )

Clear request headers.

Returns
Zend_Controller_Request_HttpTestCase
clearPost ( )

Clear POST values.

Returns
Zend_Controller_Request_HttpTestCase
clearQuery ( )

Clear GET values.

Returns
Zend_Controller_Request_HttpTestCase
clearRawBody ( )

Clear raw POST body.

Returns
Zend_Controller_Request_HttpTestCase
getHeader (   $header,
  $default = null 
)

Get request header.

Parameters
string$header
mixed$default
Returns
string|null
getHeaders ( )

Get all request headers.

Returns
array
getMethod ( )

Get request method.

Returns
string|null
getRawBody ( )

Get RAW POST body.

Returns
string|null
getRequestUri ( )

Get REQUEST_URI.

Returns
null|string
setCookie (   $key,
  $value 
)

Set a cookie.

Parameters
string$key
mixed$value
Returns
Zend_Controller_Request_HttpTestCase
setCookies ( array  $cookies)

Set multiple cookies at once.

Parameters
array$cookies
Returns
void
setHeader (   $key,
  $value 
)

Set a request header.

Parameters
string$key
string$value
Returns
Zend_Controller_Request_HttpTestCase
setHeaders ( array  $headers)

Set request headers.

Parameters
array$headers
Returns
Zend_Controller_Request_HttpTestCase
setMethod (   $type)

Set request method.

Parameters
string$type
Returns
Zend_Controller_Request_HttpTestCase
setRawBody (   $content)

Set raw POST body.

Parameters
string$content
Returns
Zend_Controller_Request_HttpTestCase

Member Data Documentation

$_headers = array()
protected
$_method = 'GET'
protected
$_rawBody
protected
$_validMethodTypes
protected
Initial value:
= array(
'DELETE',
'GET',
'HEAD',
'OPTIONS',
'POST',
'PUT',
)