From 7746d7d26a5d2094c3c36c0edbe300fa7f4d8ced Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Mon, 10 Oct 2016 21:34:38 +0200 Subject: [PATCH] addSlimPlugins is deprecated --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 0653081..f9fdd7d 100644 --- a/index.php +++ b/index.php @@ -13,7 +13,10 @@ $container = $app->getContainer(); $container['view'] = function ($c) { $view = new \Slim\Views\Smarty(__DIR__.'/templates/'); - $view->addSlimPlugins($c['router'], $c['request']->getUri()); + $smartyPlugins = new \Slim\Views\SmartyPlugins($c['router'], $c['request']->getUri()); + $view->registerPlugin('function', 'path_for', [$smartyPlugins, 'pathFor']); + $view->registerPlugin('function', 'base_url', [$smartyPlugins, 'baseUrl']); + $view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme');