original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: get route config from manifest xml
  
  @param SimpleXmlElement $node
  @return array|false
docstring_tokens: get route config from manifest xml