|
| __construct ($fileName, $offset) |
| The InlineLoader requires a filename and offset to process templates.
|
|
| load ($name) |
| Load a Template by name.
|
|
|
| loadTemplates () |
| Parse and load templates from the end of a source file.
|
|
|
| $fileName |
|
| $offset |
|
| $templates |
|
◆ __construct()
Mustache_Loader_InlineLoader::__construct |
( |
| $fileName, |
|
|
| $offset ) |
The InlineLoader requires a filename and offset to process templates.
The magic constants __FILE__
and __COMPILER_HALT_OFFSET__
are usually perfectly suited to the job:
$loader = new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__);
Note that this only works if the loader is instantiated inside the same file as the inline templates. If the templates are located in another file, it would be necessary to manually specify the filename and offset.
- Parameters
-
string | $fileName | The file to parse for inline templates |
int | $offset | A string offset for the start of the templates. This usually coincides with the __halt_compiler call, and the __COMPILER_HALT_OFFSET__ |
◆ load()
Mustache_Loader_InlineLoader::load |
( |
| $name | ) |
|
Load a Template by name.
- Exceptions
-
- Parameters
-
- Return values
-
string | Mustache Template source |
Implements Mustache_Loader.
The documentation for this class was generated from the following file:
- lib/mustache/src/Mustache/Loader/InlineLoader.php