Zend\Mvc\View\Http\ViewManager::registerMvcRenderingStrategies PHP Метод

registerMvcRenderingStrategies() защищенный Метод

If there is a "mvc_strategies" key of the view manager configuration, loop through it. Pull each as a service from the service manager, and, if it is a ListenerAggregate, attach it to the view, at priority 100. This latter allows each to trigger before the default mvc rendering strategy, and for them to trigger in the order they are registered.
protected registerMvcRenderingStrategies ( Zend\EventManager\EventManagerInterface $events ) : void
$events Zend\EventManager\EventManagerInterface
Результат void
    protected function registerMvcRenderingStrategies(EventManagerInterface $events)
    {
        if (!isset($this->config['mvc_strategies'])) {
            return;
        }
        $mvcStrategies = $this->config['mvc_strategies'];
        if (is_string($mvcStrategies)) {
            $mvcStrategies = [$mvcStrategies];
        }
        if (!is_array($mvcStrategies) && !$mvcStrategies instanceof Traversable) {
            return;
        }
        foreach ($mvcStrategies as $mvcStrategy) {
            if (!is_string($mvcStrategy)) {
                continue;
            }
            $listener = $this->services->get($mvcStrategy);
            if ($listener instanceof ListenerAggregateInterface) {
                $listener->attach($events, 100);
            }
        }
    }