|
| load (string $template, array $data) |
|
| combineData (array $data, int $cacheData) |
|
| load (string $template, array $data) |
|
|
| $_fileExt = "html" |
|
| $twig = null |
|
| $response = null |
|
| $logger = null |
|
| $tplExt = "" |
|
| $template = "" |
|
| $templateDir = "" |
|
| $cachedData = [] |
|
|
const | TPL_CACHE_VARS = 100 |
|
const | TPL_USE_VARS_ONLY = 101 |
|
const | TPL_NO_CACHE_VARS = 102 |
|
const | TPL_RETURN = 200 |
|
const | TPL_OUTPUT = 201 |
|
SlaxWeb\ViewTwig\Loader\Twig::__construct |
( |
Response |
$response, |
|
|
Logger |
$logger, |
|
|
Twig_Environment |
$twig |
|
) |
| |
Class constructor
Assigns the dependant Response object to the class property. The View loader will automatically add template contents to as response body.
- Parameters
-
\Symfony\Component\HttpFoundation\Response | $response | Response object |
\Psr\Log\LoggerInterface | $logger | PSR4 compatible Logger object |
\Twig_Environment | $twig | Twig template loader |
- Returns
- void
SlaxWeb\ViewTwig\Loader\Twig::load |
( |
string |
$template, |
|
|
array |
$data |
|
) |
| |
|
protected |
Load template
Load and render the template file with twig.
- Parameters
-
string | $template | Path to the template file |
array | $data | View data |
- Returns
- string
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/view-twig/src/Loader/Twig.php