public function merge(array $newConfig, array &$config)
    {
        foreach ($newConfig as $routeName => $routeInfo) {
            if (!isset($config[$routeName])) {
                $config[$routeName] = $this->newRoute($routeName, $routeInfo);
            }

            if (isset($routeInfo['child_routes'])) {
                if (!isset($config[$routeName]['child_routes'])) {
                    $config[$routeName]['child_routes'] = array();
                }

                $this->merge($routeInfo['child_routes'], $config[$routeName]['child_routes']);
            }
        }
    }
public function merge(array $newConfig, array &$config)
    {
        foreach ($newConfig as $routeName => $routeInfo) {
            if (!isset($config[$routeName])) {
                $config[$routeName] = $this->newRoute($routeName, $routeInfo);
            }

            if (isset($routeInfo['child_routes'])) {
                if (!isset($config[$routeName]['child_routes'])) {
                    $config[$routeName]['child_routes'] = array();
                }

                $this->merge($routeInfo['child_routes'], $config[$routeName]['child_routes']);
            }
        }
    }
public function merge ( array $ newConfig , array & $ config ) { foreach ( $ newConfig as $ routeName => $ routeInfo ) { if ( ! isset ( $ config [ $ routeName ] ) ) { $ config [ $ routeName ] = $ this -> newRoute ( $ routeName , $ routeInfo ) ; } if ( isset ( $ routeInfo [ 'child_routes' ] ) ) { if ( ! isset ( $ config [ $ routeName ] [ 'child_routes' ] ) ) { $ config [ $ routeName ] [ 'child_routes' ] = array ( ) ; } $ this -> merge ( $ routeInfo [ 'child_routes' ] , $ config [ $ routeName ] [ 'child_routes' ] ) ; } } }
Recursively update the route stack.

@todo Convert recursion to iteration
@param  array $newConfig
@param  array $config
@return RouteInterface
Recursively update the route stack .