Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Mustache_Loader_ArrayLoader Class Reference
Inheritance diagram for Mustache_Loader_ArrayLoader:
Mustache_Loader Mustache_Loader_MutableLoader

Public Member Functions

 __construct (array $templates=array())
 ArrayLoader constructor.
 
 load ($name)
 Load a Template.
 
 setTemplate ($name, $template)
 Set a Template source by name.
 
 setTemplates (array $templates)
 Set an associative array of Template sources for this loader.
 

Constructor & Destructor Documentation

◆ __construct()

Mustache_Loader_ArrayLoader::__construct ( array $templates = array())

ArrayLoader constructor.

Parameters
array$templatesAssociative array of Template source (default: array())

Member Function Documentation

◆ load()

Mustache_Loader_ArrayLoader::load ( $name)

Load a Template.

Exceptions
Mustache_Exception_UnknownTemplateExceptionIf a template file is not found
Parameters
string$name
Return values
stringMustache Template source

Implements Mustache_Loader.

◆ setTemplate()

Mustache_Loader_ArrayLoader::setTemplate ( $name,
$template )

Set a Template source by name.

Parameters
string$name
string$templateMustache Template source

Implements Mustache_Loader_MutableLoader.

◆ setTemplates()

Mustache_Loader_ArrayLoader::setTemplates ( array $templates)

Set an associative array of Template sources for this loader.

Parameters
array$templates

Implements Mustache_Loader_MutableLoader.


The documentation for this class was generated from the following file: