Skip to content

Commit

Permalink
ZF3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Yo-han authored Nov 2, 2016
1 parent cddc7bf commit 2afbc3e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/SmartyModule/Service/SmartyViewTemplatePathStackFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@
class SmartyViewTemplatePathStackFactory implements FactoryInterface
{

/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return mixed
*/
public function createService(ServiceLocatorInterface $serviceLocator)
public function __invoke(\Interop\Container\ContainerInterface $container, $requestedName, array $options = NULL)
{
$config = $serviceLocator->get('Config');
$config = $container->get('Config');
$templatePathStack = new ViewResolver\TemplatePathStack();
if (is_array($config) && isset($config['view_manager'])) {
$config = $config['view_manager'];
Expand All @@ -38,5 +32,10 @@ public function createService(ServiceLocatorInterface $serviceLocator)

return $templatePathStack;
}

public function createService(ServiceLocatorInterface $services)
{
return $this($services, 'SmartyRenderer');
}

}
}

0 comments on commit 2afbc3e

Please sign in to comment.