Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/TwigMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TwigMiddleware implements MiddlewareInterface
*
* @return TwigMiddleware
*/
public static function createFromContainer(App $app, string $containerKey = 'view'): self
public static function createFromContainer(App $app, string $containerKey = 'view', string $attributeName = 'view'): self
{
$container = $app->getContainer();
if ($container === null) {
Expand All @@ -56,7 +56,8 @@ public static function createFromContainer(App $app, string $containerKey = 'vie
return new self(
$twig,
$app->getRouteCollector()->getRouteParser(),
$app->getBasePath()
$app->getBasePath(),
$attributeName
);
}

Expand Down