JRouter/getVar: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Get a router variable
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
... |
No edit summary |
||
| Line 32: | Line 32: | ||
{ | { | ||
$result = null; | $result = null; | ||
if (isset($this->_vars[$key])) { | if(isset($this->_vars[$key])) { | ||
$result = $this->_vars[$key]; | $result = $this->_vars[$key]; | ||
} | } | ||
Revision as of 22:11, 22 March 2010
Description
Get a router variable
Template:Description:JRouter/getVar
Syntax
getVar($key)
| Parameter Name | Default Value | Description |
|---|---|---|
| $key | $key The name of the variable $return mixed Value of the variable |
Defined in
libraries/joomla/application/router.php
Importing
jimport( 'joomla.application.router' );
Source Body
function getVar($key)
{
$result = null;
if(isset($this->_vars[$key])) {
$result = $this->_vars[$key];
}
return $result;
}
[Edit See Also] Template:SeeAlso:JRouter/getVar
Examples
<CodeExamplesForm />