Back to Router class

Method setVars

public void
setVars
(mixed $vars = array(), mixed $merge = true)
Set the router variable array
Parameters
  • array $vars An associative array with variables
  • bool $merge If True, the array will be merged instead of overwritten
Returns
  • void
Since
  • 1.5
Class: Router
Project: Joomla

Method setVars - Source code

/**
 * Set the router variable array
 *
 * @param   array    $vars   An associative array with variables
 * @param   boolean  $merge  If True, the array will be merged instead of overwritten
 *
 * @return  void
 *
 * @since   1.5
 */
public function setVars($vars = array(), $merge = true)
{
    if ($merge) {
        $this->vars = array_merge($this->vars, $vars);
    } else {
        $this->vars = $vars;
    }
}