Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Mustache_Source Interface Reference
Inheritance diagram for Mustache_Source:
Mustache_Source_FilesystemSource

Public Member Functions

 getKey ()
 Get the Source key (used to generate the compiled class name).
 
 getSource ()
 Get the template Source.
 

Member Function Documentation

◆ getKey()

Mustache_Source::getKey ( )

Get the Source key (used to generate the compiled class name).

This must return a distinct key for each template source. For example, an MD5 hash of the template contents would probably do the trick. The ProductionFilesystemLoader uses mtime and file path. If your production source directory is under version control, you could use the current Git rev and the file path...

Exceptions
RuntimeExceptionwhen a source file cannot be read
Return values
string

Implemented in Mustache_Source_FilesystemSource.

◆ getSource()

Mustache_Source::getSource ( )

Get the template Source.

Exceptions
RuntimeExceptionwhen a source file cannot be read
Return values
string

Implemented in Mustache_Source_FilesystemSource.


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