Accept any PSR container in ViewFactory

This commit is contained in:
Pierre Rudloff 2017-04-26 01:08:42 +02:00
parent 29c432c159
commit df2de166cb

View file

@ -5,7 +5,7 @@
namespace Alltube; namespace Alltube;
use Slim\Container; use Psr\Container\ContainerInterface;
use Slim\Http\Request; use Slim\Http\Request;
use Slim\Views\Smarty; use Slim\Views\Smarty;
use Slim\Views\SmartyPlugins; use Slim\Views\SmartyPlugins;
@ -23,7 +23,7 @@ class ViewFactory
* *
* @return Smarty * @return Smarty
*/ */
public static function create(Container $container, Request $request = null) public static function create(ContainerInterface $container, Request $request = null)
{ {
if (!isset($request)) { if (!isset($request)) {
$request = $container['request']; $request = $container['request'];