3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Mvc\Service
;
12 use Interop\Container\ContainerInterface
;
13 use Zend\ServiceManager\FactoryInterface
;
14 use Zend\ServiceManager\ServiceLocatorInterface
;
15 use Zend\View\Renderer\PhpRenderer
;
17 class ViewPhpRendererFactory
implements FactoryInterface
20 * @param ContainerInterface $container
22 * @param null|array $options
25 public function __invoke(ContainerInterface
$container, $name, array $options = null)
27 $renderer = new PhpRenderer();
28 $renderer->setHelperPluginManager($container->get('ViewHelperManager'));
29 $renderer->setResolver($container->get('ViewResolver'));
35 * Create and return PhpRenderer instance
37 * For use with zend-servicemanager v2; proxies to __invoke().
39 * @param ServiceLocatorInterface $container
42 public function createService(ServiceLocatorInterface
$container)
44 return $this($container, PhpRenderer
::class);