protected function getRouteConfig($node)
    {
        if ((!$node instanceof SimpleXmlElement) || !$node->route) {
            return false;
        }

        $config = array();

        foreach ($node->route as $route) {
            $type = (string)$route['type'];
            $name = (string)$route['name'];
            if (!$name) {
                continue;
            }

            $routeConfig = $this->getRouteConfigOptions($route, $type);
            if (!is_array($routeConfig)) {
                return null;
            }

            $config[$name] = $routeConfig;
            if (isset($route['mayterminate'])) {
                $config[$name]['may_terminate'] = $route->is('mayterminate');
            }

            $children = $this->getRouteConfig($route->routes);
            if (!empty($children)) {
                $config[$name]['child_routes'] = $children;
            }
        }

        return $config;
    }
protected function getRouteConfig($node)
    {
        if ((!$node instanceof SimpleXmlElement) || !$node->route) {
            return false;
        }

        $config = array();

        foreach ($node->route as $route) {
            $type = (string)$route['type'];
            $name = (string)$route['name'];
            if (!$name) {
                continue;
            }

            $routeConfig = $this->getRouteConfigOptions($route, $type);
            if (!is_array($routeConfig)) {
                return null;
            }

            $config[$name] = $routeConfig;
            if (isset($route['mayterminate'])) {
                $config[$name]['may_terminate'] = $route->is('mayterminate');
            }

            $children = $this->getRouteConfig($route->routes);
            if (!empty($children)) {
                $config[$name]['child_routes'] = $children;
            }
        }

        return $config;
    }
protected function getRouteConfig ( $ node ) { if ( ( ! $ node instanceof SimpleXmlElement ) || ! $ node -> route ) { return false ; } $ config = array ( ) ; foreach ( $ node -> route as $ route ) { $ type = ( string ) $ route [ 'type' ] ; $ name = ( string ) $ route [ 'name' ] ; if ( ! $ name ) { continue ; } $ routeConfig = $ this -> getRouteConfigOptions ( $ route , $ type ) ; if ( ! is_array ( $ routeConfig ) ) { return null ; } $ config [ $ name ] = $ routeConfig ; if ( isset ( $ route [ 'mayterminate' ] ) ) { $ config [ $ name ] [ 'may_terminate' ] = $ route -> is ( 'mayterminate' ) ; } $ children = $ this -> getRouteConfig ( $ route -> routes ) ; if ( ! empty ( $ children ) ) { $ config [ $ name ] [ 'child_routes' ] = $ children ; } } return $ config ; }
get route config from manifest xml

@param SimpleXmlElement $node
@return array|false
get route config from manifest xml