JRouter/getVar: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
Line 4: | Line 4: | ||
===Syntax=== | ===Syntax=== | ||
Line 41: | Line 41: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=getVar | category=getVar | ||
category=JRouter | category=JRouter | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> |
Latest revision as of 02:02, 25 March 2017
Description
Get a router variable
Syntax
getVar($key)
Parameter Name | Default Value | Description |
---|---|---|
$key | The name of the variable |
Returns
mixed Value of the variable
Defined in
libraries/joomla/application/router.php
Importing
jimport( 'joomla.application.router' );
Source Body
public function getVar($key)
{
$result = null;
if (isset($this->_vars[$key])) {
$result = $this->_vars[$key];
}
return $result;
}
Examples
Code Examples