3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 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 Zend\ServiceManager\FactoryInterface
;
13 use Zend\ServiceManager\ServiceLocatorInterface
;
14 use Zend\View\Resolver
as ViewResolver
;
16 class ViewResolverFactory
implements FactoryInterface
19 * Create the aggregate view resolver
21 * Creates a Zend\View\Resolver\AggregateResolver and attaches the template
22 * map resolver and path stack resolver
24 * @param ServiceLocatorInterface $serviceLocator
25 * @return ViewResolver\AggregateResolver
27 public function createService(ServiceLocatorInterface
$serviceLocator)
29 $resolver = new ViewResolver\
AggregateResolver();
30 $resolver->attach($serviceLocator->get('ViewTemplateMapResolver'));
31 $resolver->attach($serviceLocator->get('ViewTemplatePathStack'));