Back to Router class

Method getVar

public mixed
getVar
(mixed $key)
Get a router variable
Parameters
  • string $key The name of the variable
Returns
  • mixed Value of the variable
Since
  • 1.5
Class: Router
Project: Joomla

Method getVar - Source code

/**
 * Get a router variable
 *
 * @param   string  $key  The name of the variable
 *
 * @return  mixed  Value of the variable
 *
 * @since   1.5
 */
public function getVar($key)
{
    $result = null;
    if (isset($this->vars[$key])) {
        $result = $this->vars[$key];
    }
    return $result;
}