Zend\Mvc\Service\ViewTemplateMapResolverFactory::__invoke PHP Method

__invoke() public method

Creates a Zend\View\Resolver\AggregateResolver and populates it with the ['view_manager']['template_map']
public __invoke ( Interop\Container\ContainerInterface $container, string $name, array $options = null ) : Zend\View\Resolver\TemplateMapResolver
$container Interop\Container\ContainerInterface
$name string
$options array
return Zend\View\Resolver\TemplateMapResolver
    public function __invoke(ContainerInterface $container, $name, array $options = null)
    {
        $config = $container->get('config');
        $map = [];
        if (is_array($config) && isset($config['view_manager'])) {
            $config = $config['view_manager'];
            if (is_array($config) && isset($config['template_map'])) {
                $map = $config['template_map'];
            }
        }
        return new ViewResolver\TemplateMapResolver($map);
    }
ViewTemplateMapResolverFactory