Abstract template engine.
More...
|
| render (string $viewName, ?array $pData=[], bool $asString=false) |
| Renders a view.
|
|
| getBlockNames (string $templateName) |
| Returns the defined block names.
|
|
| getCode (string $templateName) |
| Returns the source code of the template.
|
|
| addFunction (string $name, $callback, array $options=[]) |
|
| exists (string $name) |
| Checks if we have the source code of a template, given its name.
|
|
| setTheme (string $theme, string $themeFolder=ThemesManager::THEMES_FOLDER) |
| Defines the activeTheme.
|
|
| getGenerator () |
|
| generateTemplateSourceFromFile (string $templateName) |
| Generates the source for this engine from a twig model template.
|
|
| generateTemplateSource (string $source) |
|
Abstract template engine.
Ubiquity\views\engine$TemplateEngine This class is part of Ubiquity
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.1.0
Definition at line 21 of file TemplateEngine.php.
◆ addExtension()
addExtension |
( |
|
$extension | ) |
|
|
abstractprotected |
◆ addFilter()
addFilter |
( |
string |
$name, |
|
|
|
$callback, |
|
|
array |
$options = [] |
|
) |
| |
|
abstractprotected |
◆ addFunction()
addFunction |
( |
string |
$name, |
|
|
|
$callback, |
|
|
array |
$options = [] |
|
) |
| |
|
abstract |
◆ addFunctions()
◆ exists()
Checks if we have the source code of a template, given its name.
- Parameters
-
- Returns
- boolean
Reimplemented in MicroTemplateEngine, and Twig.
◆ generateTemplateSource()
generateTemplateSource |
( |
string |
$source | ) |
|
◆ generateTemplateSourceFromFile()
generateTemplateSourceFromFile |
( |
string |
$templateName | ) |
|
Generates the source for this engine from a twig model template.
- Parameters
-
- Returns
- string
Definition at line 158 of file TemplateEngine.php.
◆ getBlockNames()
getBlockNames |
( |
string |
$templateName | ) |
|
|
abstract |
◆ getCode()
getCode |
( |
string |
$templateName | ) |
|
|
abstract |
◆ getGenerator()
◆ hasThemeResource()
hasThemeResource |
( |
& |
$resource | ) |
|
|
protected |
◆ render()
render |
( |
string |
$viewName, |
|
|
?array |
$pData = [] , |
|
|
bool |
$asString = false |
|
) |
| |
|
abstract |
Renders a view.
- Parameters
-
string | $viewName | |
array | null | $pData | |
boolean | $asString | |
Reimplemented in MicroTemplateEngine, and Twig.
◆ safeString()
safeString |
( |
string |
$str | ) |
|
|
protected |
◆ setTheme()
setTheme |
( |
string |
$theme, |
|
|
string |
$themeFolder = ThemesManager::THEMES_FOLDER |
|
) |
| |
Defines the activeTheme.
activeTheme namespace is @activeTheme
- Parameters
-
string | $theme | |
string | $themeFolder | |
- Exceptions
-
Reimplemented in Twig.
Definition at line 87 of file TemplateEngine.php.
◆ $fw
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/views/engine/TemplateEngine.php