protected function &getReferenceForPath(array $path, array &$config)
    {
        $path = array_filter($path, function ($value) {
            return (bool) $value;
        });

        $ref = &$config;

        if (empty($path)) {
            return $ref;
        }

        foreach ($path as $key) {
            if (!isset($ref[$key])) {
                $ref[$key] = [
                    'child_routes' => []
                ];
            }
            $ref = &$ref[$key]['child_routes'];
        }

        return $ref;
    }
protected function &getReferenceForPath(array $path, array &$config)
    {
        $path = array_filter($path, function ($value) {
            return (bool) $value;
        });

        $ref = &$config;

        if (empty($path)) {
            return $ref;
        }

        foreach ($path as $key) {
            if (!isset($ref[$key])) {
                $ref[$key] = [
                    'child_routes' => []
                ];
            }
            $ref = &$ref[$key]['child_routes'];
        }

        return $ref;
    }
protected function & getReferenceForPath ( array $ path , array & $ config ) { $ path = array_filter ( $ path , function ( $ value ) { return ( bool ) $ value ; } ) ; $ ref = & $ config ; if ( empty ( $ path ) ) { return $ ref ; } foreach ( $ path as $ key ) { if ( ! isset ( $ ref [ $ key ] ) ) { $ ref [ $ key ] = [ 'child_routes' => [ ] ] ; } $ ref = & $ ref [ $ key ] [ 'child_routes' ] ; } return $ ref ; }
Extend parent route with children.

@param array $path
@param array $config
@return array
Extend parent route with children .