You are here

public function Text_Template::setVar in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-text-template/src/Template.php \Text_Template::setVar()

Sets one or more template variables.

Parameters

array $values:

bool $merge:

File

vendor/phpunit/php-text-template/src/Template.php, line 82

Class

Text_Template
A simple template engine.

Code

public function setVar(array $values, $merge = TRUE) {
  if (!$merge || empty($this->values)) {
    $this->values = $values;
  }
  else {
    $this->values = array_merge($this->values, $values);
  }
}