You are here

public function Text_Template::render in Zircon Profile 8.0

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

Renders the template and returns the result.

Return value

string

1 call to Text_Template::render()
Text_Template::renderTo in vendor/phpunit/php-text-template/src/Template.php
Renders the template and writes the result to a file.

File

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

Class

Text_Template
A simple template engine.

Code

public function render() {
  $keys = array();
  foreach ($this->values as $key => $value) {
    $keys[] = $this->openDelimiter . $key . $this->closeDelimiter;
  }
  return str_replace($keys, $this->values, $this->template);
}