src/ZfcTwig/Twig/StackLoaderFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var \ZfcTwig\moduleOptions $options */
        $options = $serviceLocator->get('ZfcTwig\ModuleOptions');

        /** @var $templateStack \Zend\View\Resolver\TemplatePathStack */
        $zfTemplateStack = $serviceLocator->get('ViewTemplatePathStack');

        $templateStack = new StackLoader($zfTemplateStack->getPaths()->toArray());
        $templateStack->setDefaultSuffix($options->getSuffix());

        return $templateStack;
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var \ZfcTwig\moduleOptions $options */
        $options = $serviceLocator->get('ZfcTwig\ModuleOptions');

        /** @var $templateStack \Zend\View\Resolver\TemplatePathStack */
        $zfTemplateStack = $serviceLocator->get('ViewTemplatePathStack');

        $templateStack = new StackLoader($zfTemplateStack->getPaths()->toArray());
        $templateStack->setDefaultSuffix($options->getSuffix());

        return $templateStack;
    }
public function createService ( ServiceLocatorInterface $ serviceLocator ) { /** @var \ZfcTwig\moduleOptions $options */ $ options = $ serviceLocator -> get ( 'ZfcTwig\ModuleOptions' ) ; /** @var $templateStack \Zend\View\Resolver\TemplatePathStack */ $ zfTemplateStack = $ serviceLocator -> get ( 'ViewTemplatePathStack' ) ; $ templateStack = new StackLoader ( $ zfTemplateStack -> getPaths ( ) -> toArray ( ) ) ; $ templateStack -> setDefaultSuffix ( $ options -> getSuffix ( ) ) ; return $ templateStack ; }
Create service

@param ServiceLocatorInterface $serviceLocator
@return mixed
Create service