src/Router.php
public function merge(RouterInterface $source = null)
    {
        if (null == $source) {
            return [
                $this->routes,
                $this->defaultParams,
            ];
        }
        list($routes, $params) = $source->merge();

        $this->routes        = array_merge($this->routes, $routes);
        $this->defaultParams = array_merge($this->defaultParams, $params);
    }
public function merge(RouterInterface $source = null)
    {
        if (null == $source) {
            return [
                $this->routes,
                $this->defaultParams,
            ];
        }
        list($routes, $params) = $source->merge();

        $this->routes        = array_merge($this->routes, $routes);
        $this->defaultParams = array_merge($this->defaultParams, $params);
    }
public function merge ( RouterInterface $ source = null ) { if ( null == $ source ) { return [ $ this -> routes , $ this -> defaultParams , ] ; } list ( $ routes , $ params ) = $ source -> merge ( ) ; $ this -> routes = array_merge ( $ this -> routes , $ routes ) ; $ this -> defaultParams = array_merge ( $ this -> defaultParams , $ params ) ; }
Merges with other router.

@param RouterInterface $source The data source

@return null|array If the source was passed returns
null, source data otherwise
Merges with other router .