API16

API16:JRouter/getVar

From Joomla! Documentation

Revision as of 02:02, 25 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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