Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\output\mustache_filesystem_loader Class Reference

Perform some custom name mapping for template file names. More...

Inheritance diagram for core\output\mustache_filesystem_loader:
Mustache_Loader_FilesystemLoader Mustache_Loader

Public Member Functions

 __construct ()
 Provide a default no-args constructor (we don't really need anything).
 
 load ($name)
 Load a Template by name.
 

Protected Member Functions

 getFileName ($name)
 Helper function for getting a Mustache template file name.
 
 loadFile ($name)
 Helper function for loading a Mustache file by name.
 
 shouldCheckPath ()
 Only check if baseDir is a directory and requested templates are files if baseDir is using the filesystem stream wrapper.
 

Detailed Description

Perform some custom name mapping for template file names.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
2.9

Member Function Documentation

◆ getFileName()

core\output\mustache_filesystem_loader::getFileName ( $name)
protected

Helper function for getting a Mustache template file name.

Uses the leading component to restrict us specific directories.

Parameters
string$name
Return values
stringTemplate file name

Reimplemented from Mustache_Loader_FilesystemLoader.

◆ load()

core\output\mustache_filesystem_loader::load ( $name)

Load a Template by name.

Parameters
string$namethe template name
Return values
stringMustache Template source

Reimplemented from Mustache_Loader_FilesystemLoader.

◆ loadFile()

Mustache_Loader_FilesystemLoader::loadFile ( $name)
protectedinherited

Helper function for loading a Mustache file by name.

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

Reimplemented in Mustache_Loader_ProductionFilesystemLoader.

◆ shouldCheckPath()

core\output\mustache_filesystem_loader::shouldCheckPath ( )
protected

Only check if baseDir is a directory and requested templates are files if baseDir is using the filesystem stream wrapper.

Always check path for mustache_filesystem_loader.

Return values
boolWhether to check is_dir and file_exists

Reimplemented from Mustache_Loader_FilesystemLoader.


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