API15

JRouter/getVar: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 45: Line 45:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=getVar
  category=getVar
  category=JRouter
  category=JRouter
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 01:05, 25 March 2017

Description

Get a router variable

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

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;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples