private static function processRouterResponse(MatchedRoute $matchedRoute, ConfigObject $config, $api)
    {
        // based on the matched route create the class name
        $className = self::str($config->get('Router.Class'))->trimLeft('\\')->prepend('\\');
        $normalize = $config->get('Router.Normalize', false);
        $matchedParams = $matchedRoute->getParams();
        foreach ($matchedParams as $mpName => $mpParam) {
            if ($normalize) {
                $mpParam = self::str($mpParam)->replace('-', ' ')->caseWordUpper()->replace(' ', '');
            }

            $className->replace('{' . $mpName . '}', $mpParam);
        }

        // return the new rest instance
        return new self($api, $className->val());
    }