Improved templating engine wrapping.
This commit is contained in:
parent
e4c3e4c052
commit
ceb6bece09
86 changed files with 784 additions and 515 deletions
tools
|
@ -77,10 +77,11 @@ handleValue:
|
|||
$hostName ??= 'localhost';
|
||||
|
||||
// this should really not be necessary, mostly done to make sure the url registry is available
|
||||
$msz->createRouting(new HttpRequest('1.1', ['Host' => [$hostName]], NullStream::instance(), [], 'GET', HttpUri::createUri('/'), [], []));
|
||||
$msz->startTemplating(false);
|
||||
$msz->registerRequestRoutes(
|
||||
new HttpRequest('1.1', ['Host' => [$hostName]], NullStream::instance(), [], 'GET', HttpUri::createUri('/'), [], [])
|
||||
);
|
||||
|
||||
$ctx = $msz->templating->load(implode(' ', array_slice($argv, $pathIndex)));
|
||||
$ctx = $msz->tplCtx->loadTemplate(implode(' ', array_slice($argv, $pathIndex)));
|
||||
|
||||
foreach($tplArgs as $name => $value)
|
||||
$ctx->setVar($name, $value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue