|
| | __construct ($baseDir, array $options=array()) |
| | Mustache filesystem Loader constructor.
|
| |
| | load ($name) |
| | Load a Template by name.
|
| |
|
| | 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.
|
| |
◆ __construct()
| Mustache_Loader_FilesystemLoader::__construct |
( |
| $baseDir, |
|
|
array | $options = array() ) |
Mustache filesystem Loader constructor.
Passing an $options array allows overriding certain Loader options during instantiation:
$options = array(
// The filename extension used for Mustache templates. Defaults to '.mustache'
'extension' => '.ms',
);
- Exceptions
-
- Parameters
-
| string | $baseDir | Base directory containing Mustache template files |
| array | $options | Array of Loader options (default: array()) |
Reimplemented in Mustache_Loader_ProductionFilesystemLoader.
◆ getFileName()
| Mustache_Loader_FilesystemLoader::getFileName |
( |
| $name | ) |
|
|
protected |
Helper function for getting a Mustache template file name.
- Parameters
-
- Return values
-
◆ load()
| Mustache_Loader_FilesystemLoader::load |
( |
| $name | ) |
|
Load a Template by name.
$loader = new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views');
$loader->load('admin/dashboard'); // loads "./views/admin/dashboard.mustache";
- Parameters
-
- Return values
-
| string | Mustache Template source |
Implements Mustache_Loader.
Reimplemented in core\output\mustache_filesystem_loader.
◆ loadFile()
| Mustache_Loader_FilesystemLoader::loadFile |
( |
| $name | ) |
|
|
protected |
◆ shouldCheckPath()
| Mustache_Loader_FilesystemLoader::shouldCheckPath |
( |
| ) |
|
|
protected |
Only check if baseDir is a directory and requested templates are files if baseDir is using the filesystem stream wrapper.
- Return values
-
| bool | Whether to check is_dir and file_exists |
The documentation for this class was generated from the following file:
- lib/mustache/src/Mustache/Loader/FilesystemLoader.php