private function resolveActionsFromRoutes(array $data, $basePath)
    {
        $actions = [];
        $type    = SystemAbstract::TYPE_ROUTES;

        if (isset($data[$type]) && is_array($data[$type])) {
            foreach ($data[$type] as $name => $row) {
                // resolve includes
                $row = IncludeDirective::resolve($row, $basePath, $type);

                if (isset($row['methods']) && is_array($row['methods'])) {
                    foreach ($row['methods'] as $method => $config) {
                        // action
                        if (isset($config['action']) && !$this->isName($config['action'])) {
                            $name = NameGenerator::getActionNameFromSource($config['action']);

                            $actions[$name] = [
                                'class' => $config['action']
                            ];
                        }
                    }
                }
            }
        }

        return $actions;
    }
private function resolveActionsFromRoutes(array $data, $basePath)
    {
        $actions = [];
        $type    = SystemAbstract::TYPE_ROUTES;

        if (isset($data[$type]) && is_array($data[$type])) {
            foreach ($data[$type] as $name => $row) {
                // resolve includes
                $row = IncludeDirective::resolve($row, $basePath, $type);

                if (isset($row['methods']) && is_array($row['methods'])) {
                    foreach ($row['methods'] as $method => $config) {
                        // action
                        if (isset($config['action']) && !$this->isName($config['action'])) {
                            $name = NameGenerator::getActionNameFromSource($config['action']);

                            $actions[$name] = [
                                'class' => $config['action']
                            ];
                        }
                    }
                }
            }
        }

        return $actions;
    }
private function resolveActionsFromRoutes ( array $ data , $ basePath ) { $ actions = [ ] ; $ type = SystemAbstract :: TYPE_ROUTES ; if ( isset ( $ data [ $ type ] ) && is_array ( $ data [ $ type ] ) ) { foreach ( $ data [ $ type ] as $ name => $ row ) { // resolve includes $ row = IncludeDirective :: resolve ( $ row , $ basePath , $ type ) ; if ( isset ( $ row [ 'methods' ] ) && is_array ( $ row [ 'methods' ] ) ) { foreach ( $ row [ 'methods' ] as $ method => $ config ) { // action if ( isset ( $ config [ 'action' ] ) && ! $ this -> isName ( $ config [ 'action' ] ) ) { $ name = NameGenerator :: getActionNameFromSource ( $ config [ 'action' ] ) ; $ actions [ $ name ] = [ 'class' => $ config [ 'action' ] ] ; } } } } } return $ actions ; }
In case the routes contains a class as action we automatically create a
fitting action entry

@param array $data
@return array
In case the routes contains a class as action we automatically create a fitting action entry