JRequest/getCmd
From Joomla! Documentation
< API16:JRequest
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Fetches and returns a given filtered variable. The cmd filter only allows the characters [A-Za-z0-9.-_]. This is currently only a proxy function for getVar().
Template:Description:JRequest/getCmd
Syntax[edit]
static getCmd($name, $default= '', $hash= 'default')
Parameter Name | Default Value | Description |
---|---|---|
$name | $name Variable name | |
$default | $default Default value if the variable does not exist | |
$hash | 'default' | $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD) |
Returns[edit]
string Requested variable
Defined in[edit]
libraries/joomla/environment/request.php
Importing[edit]
jimport( 'joomla.environment.request' );
Source Body[edit]
public static function getCmd($name, $default = '', $hash = 'default')
{
return self::getVar($name, $default, $hash, 'cmd');
}
[Edit See Also] Template:SeeAlso:JRequest/getCmd
Examples[edit]
<CodeExamplesForm />