Zend Framework
1.12
|
Public Member Functions | |
__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. | |
![]() | |
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. | |
Public Attributes | |
const | SCHEME_HTTP = 'http' |
Scheme for http. | |
const | SCHEME_HTTPS = 'https' |
Scheme for https. | |
Protected Attributes | |
$_paramSources = array('_GET', '_POST') | |
$_requestUri | |
$_baseUrl = null | |
$_basePath = null | |
$_pathInfo = '' | |
$_params = array() | |
$_rawBody | |
$_aliases = array() | |
![]() | |
$_dispatched = false | |
$_module | |
$_moduleKey = 'module' | |
$_controller | |
$_controllerKey = 'controller' | |
$_action | |
$_actionKey = 'action' | |
$_params = array() | |
__construct | ( | $uri = null | ) |
Constructor.
If a $uri is passed, the object will attempt to populate itself using that information.
string | Zend_Uri | $uri |
Zend_Controller_Request_Exception | when invalid URI passed |
__get | ( | $key | ) |
Access values contained in the superglobals as public members Order of precedence: 1.
GET, 2. POST, 3. COOKIE, 4. SERVER, 5. ENV
string | $key |
__isset | ( | $key | ) |
Check to see if a property is set.
string | $key |
__set | ( | $key, | |
$value | |||
) |
Set values.
In order to follow __get(), which operates on a number of superglobals, setting values through overloading is not allowed and will raise an exception. Use setParam() instead.
string | $key | |
mixed | $value |
Zend_Controller_Request_Exception |
get | ( | $key | ) |
Alias to __get.
string | $key |
getAlias | ( | $name | ) |
Retrieve an alias.
Retrieve the actual key represented by the alias $name.
string | $name |
getAliases | ( | ) |
Retrieve the list of all aliases.
getBasePath | ( | ) |
Everything in REQUEST_URI before PATH_INFO not including the filename.
getBaseUrl | ( | $raw = false | ) |
Everything in REQUEST_URI before PATH_INFO <form action="<?=$baseUrl?>/news/submit" method="POST">
getClientIp | ( | $checkProxy = true | ) |
Get the client's IP addres.
boolean | $checkProxy |
getCookie | ( | $key = null , |
|
$default = null |
|||
) |
Retrieve a member of the $_COOKIE superglobal.
If no $key is passed, returns the entire $_COOKIE array.
string | $key | |
mixed | $default | Default value to use if key not found |
getEnv | ( | $key = null , |
|
$default = null |
|||
) |
Retrieve a member of the $_ENV superglobal.
If no $key is passed, returns the entire $_ENV array.
string | $key | |
mixed | $default | Default value to use if key not found |
getHeader | ( | $header | ) |
Return the value of the given HTTP header.
Pass the header name as the plain, HTTP-specified header name. Ex.: Ask for 'Accept' to get the Accept header, 'Accept-Encoding' to get the Accept-Encoding header.
string | $header | HTTP header name |
Zend_Controller_Request_Exception |
getHttpHost | ( | ) |
Get the HTTP host.
"Host" ":" host [ ":" port ] ; Section 3.2.2 Note the HTTP Host header is not the same as the URI host. It includes the port while the URI host doesn't.
getMethod | ( | ) |
Return the method by which the request was made.
getParam | ( | $key, | |
$default = null |
|||
) |
Retrieve a parameter.
Retrieves a parameter from the instance. Priority is in the order of userland parameters (see setParam()), $_GET, $_POST. If a parameter matching the $key is not found, null is returned.
If the $key is an alias, the actual key aliased will be used.
mixed | $key | |
mixed | $default | Default value to use if key not found |
getParams | ( | ) |
Retrieve an array of parameters.
Retrieves a merged array of parameters, with precedence of userland params (see setParam()), $_GET, $_POST (i.e., values in the userland params will take precedence over all others).
getParamSources | ( | ) |
Get list of allowed parameter sources.
getPathInfo | ( | ) |
Returns everything between the BaseUrl and QueryString.
This value is calculated instead of reading PATH_INFO directly from $_SERVER due to cross-platform differences.
getPost | ( | $key = null , |
|
$default = null |
|||
) |
Retrieve a member of the $_POST superglobal.
If no $key is passed, returns the entire $_POST array.
string | $key | |
mixed | $default | Default value to use if key not found |
getQuery | ( | $key = null , |
|
$default = null |
|||
) |
Retrieve a member of the $_GET superglobal.
If no $key is passed, returns the entire $_GET array.
string | $key | |
mixed | $default | Default value to use if key not found |
getRawBody | ( | ) |
Return the raw body of the request, if present.
getRequestUri | ( | ) |
Returns the REQUEST_URI taking into account platform differences between Apache and IIS.
getScheme | ( | ) |
Get the request URI scheme.
getServer | ( | $key = null , |
|
$default = null |
|||
) |
Retrieve a member of the $_SERVER superglobal.
If no $key is passed, returns the entire $_SERVER array.
string | $key | |
mixed | $default | Default value to use if key not found |
has | ( | $key | ) |
isDelete | ( | ) |
Was the request made by DELETE?
isFlashRequest | ( | ) |
Is this a Flash request?
isGet | ( | ) |
Was the request made by GET?
isHead | ( | ) |
Was the request made by HEAD?
isOptions | ( | ) |
Was the request made by OPTIONS?
isPost | ( | ) |
Was the request made by POST?
isPut | ( | ) |
Was the request made by PUT?
isSecure | ( | ) |
Is https secure request.
isXmlHttpRequest | ( | ) |
Is the request a Javascript XMLHttpRequest?
Should work with Prototype/Script.aculo.us, possibly others.
set | ( | $key, | |
$value | |||
) |
setAlias | ( | $name, | |
$target | |||
) |
Set a key alias.
Set an alias used for key lookups. $name specifies the alias, $target specifies the actual key to use.
string | $name | |
string | $target |
setBasePath | ( | $basePath = null | ) |
Set the base path for the URL.
string | null | $basePath |
setBaseUrl | ( | $baseUrl = null | ) |
Set the base URL of the request; i.e., the segment leading to the script name.
E.g.:
Do not use the full URI when providing the base. The following are examples of what not to use:
If no $baseUrl is provided, attempts to determine the base URL from the environment, using SCRIPT_FILENAME, SCRIPT_NAME, PHP_SELF, and ORIG_SCRIPT_NAME in its determination.
mixed | $baseUrl |
setParam | ( | $key, | |
$value | |||
) |
Set a userland parameter.
Uses $key to set a userland parameter. If $key is an alias, the actual key will be retrieved and used to set the parameter.
mixed | $key | |
mixed | $value |
setParams | ( | array | $params | ) |
Set parameters.
Set one or more parameters. Parameters are set as userland parameters, using the keys specified in the array.
array | $params |
setParamSources | ( | array | $paramSources = array() | ) |
Set allowed parameter sources.
Can be empty array, or contain one or more of '_GET' or '_POST'.
array | $paramSoures |
setPathInfo | ( | $pathInfo = null | ) |
setPost | ( | $spec, | |
$value = null |
|||
) |
Set POST values.
string | array | $spec | |
null | mixed | $value |
setQuery | ( | $spec, | |
$value = null |
|||
) |
Set GET values.
string | array | $spec | |
null | mixed | $value |
setRequestUri | ( | $requestUri = null | ) |
Set the REQUEST_URI on which the instance operates.
If no request URI is passed, uses the value in $_SERVER['REQUEST_URI'], $_SERVER['HTTP_X_REWRITE_URL'], or $_SERVER['ORIG_PATH_INFO'] + $_SERVER['QUERY_STRING'].
string | $requestUri |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const SCHEME_HTTP = 'http' |
Scheme for http.
const SCHEME_HTTPS = 'https' |
Scheme for https.