protected function getActionHandles(EventInterface $event)
    {
        /* @var $routeMatch MvcEvent */
        $routeMatch = $event->getRouteMatch();
        $controller = $event->getTarget();

        if (is_object($controller)) {
            $controller = get_class($controller);
        }

        $routeMatchController = $routeMatch->getParam('controller', '');
        if (!$controller || ($this->preferRouteMatchController && $routeMatchController)) {
            $controller = $routeMatchController;
        }

        $template = $this->mapController($controller);
        if (!$template) {
            $module     = $this->deriveModuleNamespace($controller);

            if ($namespace = $routeMatch->getParam(ModuleRouteListener::MODULE_NAMESPACE)) {
                $controllerSubNs = $this->deriveControllerSubNamespace($namespace);
                if (!empty($controllerSubNs)) {
                    if (!empty($module)) {
                        $module .= self::TEMPLATE_SEPARATOR . $controllerSubNs;
                    } else {
                        $module = $controllerSubNs;
                    }
                }
            }

            $controller = $this->deriveControllerClass($controller);
            $template = $this->inflectName($module);

            if (!empty($template)) {
                $template .= self::TEMPLATE_SEPARATOR;
            }
            $template .= $this->inflectName($controller);
        }

        $action = $routeMatch->getParam('action');
        if (null !== $action) {
            $template .= self::TEMPLATE_SEPARATOR . $this->inflectName($action);
        }

        $priority = 0;
        $actionHandles = [];
        $previousHandle = '';
        $templateParts = explode(self::TEMPLATE_SEPARATOR, $template);

        foreach ($templateParts as $name) {
            $priority += 10;
            $actionHandles[] = new Handle($previousHandle.$name, $priority);
            $previousHandle .= $name.self::TEMPLATE_SEPARATOR;
        }

        return $actionHandles;
    }
protected function getActionHandles(EventInterface $event)
    {
        /* @var $routeMatch MvcEvent */
        $routeMatch = $event->getRouteMatch();
        $controller = $event->getTarget();

        if (is_object($controller)) {
            $controller = get_class($controller);
        }

        $routeMatchController = $routeMatch->getParam('controller', '');
        if (!$controller || ($this->preferRouteMatchController && $routeMatchController)) {
            $controller = $routeMatchController;
        }

        $template = $this->mapController($controller);
        if (!$template) {
            $module     = $this->deriveModuleNamespace($controller);

            if ($namespace = $routeMatch->getParam(ModuleRouteListener::MODULE_NAMESPACE)) {
                $controllerSubNs = $this->deriveControllerSubNamespace($namespace);
                if (!empty($controllerSubNs)) {
                    if (!empty($module)) {
                        $module .= self::TEMPLATE_SEPARATOR . $controllerSubNs;
                    } else {
                        $module = $controllerSubNs;
                    }
                }
            }

            $controller = $this->deriveControllerClass($controller);
            $template = $this->inflectName($module);

            if (!empty($template)) {
                $template .= self::TEMPLATE_SEPARATOR;
            }
            $template .= $this->inflectName($controller);
        }

        $action = $routeMatch->getParam('action');
        if (null !== $action) {
            $template .= self::TEMPLATE_SEPARATOR . $this->inflectName($action);
        }

        $priority = 0;
        $actionHandles = [];
        $previousHandle = '';
        $templateParts = explode(self::TEMPLATE_SEPARATOR, $template);

        foreach ($templateParts as $name) {
            $priority += 10;
            $actionHandles[] = new Handle($previousHandle.$name, $priority);
            $previousHandle .= $name.self::TEMPLATE_SEPARATOR;
        }

        return $actionHandles;
    }
protected function getActionHandles ( EventInterface $ event ) { /* @var $routeMatch MvcEvent */ $ routeMatch = $ event -> getRouteMatch ( ) ; $ controller = $ event -> getTarget ( ) ; if ( is_object ( $ controller ) ) { $ controller = get_class ( $ controller ) ; } $ routeMatchController = $ routeMatch -> getParam ( 'controller' , '' ) ; if ( ! $ controller || ( $ this -> preferRouteMatchController && $ routeMatchController ) ) { $ controller = $ routeMatchController ; } $ template = $ this -> mapController ( $ controller ) ; if ( ! $ template ) { $ module = $ this -> deriveModuleNamespace ( $ controller ) ; if ( $ namespace = $ routeMatch -> getParam ( ModuleRouteListener :: MODULE_NAMESPACE ) ) { $ controllerSubNs = $ this -> deriveControllerSubNamespace ( $ namespace ) ; if ( ! empty ( $ controllerSubNs ) ) { if ( ! empty ( $ module ) ) { $ module .= self :: TEMPLATE_SEPARATOR . $ controllerSubNs ; } else { $ module = $ controllerSubNs ; } } } $ controller = $ this -> deriveControllerClass ( $ controller ) ; $ template = $ this -> inflectName ( $ module ) ; if ( ! empty ( $ template ) ) { $ template .= self :: TEMPLATE_SEPARATOR ; } $ template .= $ this -> inflectName ( $ controller ) ; } $ action = $ routeMatch -> getParam ( 'action' ) ; if ( null !== $ action ) { $ template .= self :: TEMPLATE_SEPARATOR . $ this -> inflectName ( $ action ) ; } $ priority = 0 ; $ actionHandles = [ ] ; $ previousHandle = '' ; $ templateParts = explode ( self :: TEMPLATE_SEPARATOR , $ template ) ; foreach ( $ templateParts as $ name ) { $ priority += 10 ; $ actionHandles [ ] = new Handle ( $ previousHandle . $ name , $ priority ) ; $ previousHandle .= $ name . self :: TEMPLATE_SEPARATOR ; } return $ actionHandles ; }
Retrieve the action handles from the matched route.

@param EventInterface $event
@return array
Retrieve the action handles from the matched route .