Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

(no description)

File Size: 39 lines (1 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Mustache_Loader_StringLoader:: (1 method):
  load()


Class: Mustache_Loader_StringLoader  - X-Ref

Mustache Template string Loader implementation.

A StringLoader instance is essentially a noop. It simply passes the 'name' argument straight through:

$loader = new StringLoader;
$tpl = $loader->load('{{ foo }}'); // '{{ foo }}'

This is the default Template Loader instance used by Mustache:

$m = new Mustache;
$tpl = $m->loadTemplate('{{ foo }}');
echo $tpl->render(array('foo' => 'bar')); // "bar"
load($name)   X-Ref
Load a Template by source.

param: string $name Mustache Template source
return: string Mustache Template source