Trackes the list of variables as defined.

@param string[]|string $variables list of variables without prefixes
777362
public function trackDefinedVariables( $variables )  {
		if ( !is_array( $variables ) ) {
			$variables = $this->matchVariables( $variables );
		}

		$this->definedVariables = array_unique( array_merge( $this->definedVariables, $variables ) );
	}
98223
public function set_vars( array $vars = [] ) {
		foreach ( $vars as $key => $value ) {
			$this->set_var( $key, $value );
		}
	}
27560
public static function set($keys, $value = null)
    {
        if (is_array($keys)) {
            self::$variables = array_merge(self::$variables, $keys);
        } else {
            self::$variables[$keys] = $value;
        }
    }
246915
public function setVars($variables)
    {
        if (!is_array($variables) && !$variables instanceof ArrayAccess) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Expected array or ArrayAccess object; received "%s"',
                (is_object($variables) ? get_class($variables) : gettype($variables))
            ));
        }

        // Enforce a Variables container
        if (!$variables instanceof Variables) {
            $variablesAsArray = array();
            foreach ($variables as $key => $value) {
                $variablesAsArray[$key] = $value;
            }
            $variables = new Variables($variablesAsArray);
        }

        $this->__vars = $variables;
        return $this;
    }
599577
protected function preprocessLinks(Variables $variables) {
    parent::preprocessLinks($variables);

    $operations = !!mb_strpos($variables->theme_hook_original, 'operations');

    // Make operations button small, not smaller ;).
    // Bootstrap basetheme override.
    if ($operations) {
      $variables->toggle['#attributes']['class'] = ['btn-sm'];
      $variables['btn_context'] = 'operations';
      $variables['alignment'] = 'right';
    }

  }
515291
@Override
	protected void putVariables(Map<String, String> variables) {
		variables.put(ScopeFormat.SCOPE_JOB_ID, jobId.toString());
		variables.put(ScopeFormat.SCOPE_JOB_NAME, jobName);
	}
1031784
public function values($variable)
    {
        foreach ($this->keywordList('VALUES') as $keyword) {
            if ($keyword->subKeys[0] == $variable) {
                return $keyword->values;
            }
        }
        throw new RuntimeException(sprintf('Could not determine values of "%s".', $variable));
    }
206426
def add_variables(vars)
      # Store all the variables in the model
      # Most of the work will be done when we add the constraints
      vars.each do |var|
        var.model = self
        var.index = @variables.count
        @variables << var
      end
    end
706427
public void setVariables(Map<String, String> variables)
    {
        if (this.variables != null)
        {
            this.variables.putAll(variables);
        }
        else
        {
            this.variables = variables;
        }
    }
210932
protected function baseVariables(array &$variables = [])
    {
        // Get base variables
        parent::baseVariables($variables);

        // Breadcrumbs
        $variables['crumbs'][] = [
            'label' => $variables['title'],
            'url' => UrlHelper::url($variables['baseCpPath'])
        ];
    }
403539
public function setCookies($cookies = [])
    {
        if (!is_array($cookies)) {
            $this->cookies = [];
        } else {
            $this->cookies      = $cookies;
            $this->trackCookies = TRUE;
        }
    }
465562
public function markVariableIfUnknown($variable, $type)
    {
        $this->variables[$variable] = $type;
        $this->infered[$variable] = $type;
    }
611527
public function setVars($vars)
    {
        // If vars is an array
        if (is_array($vars) && count($vars)) {
            // Iterate and set the var
            foreach ($vars as $key => $value) {
                $this->setVar($key, $value);
            }
        }
        return $this;
    }
259070
public function prepareTemplateVariables($variables)
    {
        if (!isset($variables)) {
            $variables = new \stdClass();
        }

        // Set name property if the schema does not define it.
        if (!isset($variables->name) && !empty($this->schema_name)) {
            $variables->name = $this->schema_name;
        }

        // Set template property if the schema does not define it.
        if (!isset($variables->template) && ($theme = $this->getTheme())) {
            $variables->template = $theme;
        }
    }
1079013
private function execVariables(array $options) {
    foreach ($options as $variable => $value) {
      if ($value === '[DELETE]') {
        variable_del($variable);
        drush_print(dt("'@var' was deleted.", ['@var' => $variable]));
      }
      else {
        variable_set($variable, $value);

        if (is_scalar($value)) {
          drush_print(dt("'@var' set to @val.", [
            '@var' => $variable,
            '@val' => $value,
          ]));
        }
        else {
          drush_print(dt("'@var' has been set.", ['@var' => $variable]));
        }
      }
    }
  }
1142157
final public static function with (array $variables) : View
	{
		foreach ($variables as $variableName => $variableValue) 
			static::$passedVariables[$variableName] = $variableValue;
		return new View;
	}
161816
protected function addVariables()
    {
        // Remove variables from the list
        $varValues = array_values($this->variables);
        $this->names = array_filter($this->names, function ($name) use ($varValues) {
            return !in_array($name, $varValues);
        });

        // Replace variables with their values
        $this->priorities = array_map(function ($name) {
            return $this->resolveValue($name);
        }, $this->priorities);
    }