private function matchDefaultMethod($callbacks, $url, $classUrl)
    {
        // match a callback based on url pattern
        $methodData = false;
        $matchedParameters = false;

        // match method
        foreach ($callbacks as $pattern => $data) {
            if ($data['default'] !== false && $data['resourceNaming'] === false) {
                // for default method we need to remove the method name from the pattern
                $methodUrl = $data['method'];
                if ($this->normalize) {
                    $methodUrl = PathTransformations::methodNameToUrl($methodUrl);
                }
                $pattern = $classUrl . '/' . str_replace($methodUrl . '/', '', $pattern);

                if (($matchedParameters = $this->doesPatternMatch($pattern, $data, $url)) !== false) {
                    $methodData = $data;
                    break;
                } else {
                    $methodName = $data['method'];
                    $data['method'] = $classUrl;
                    $matchedParameters = $this->tryMatchingOptionalParams($pattern, $data, $url);
                    $data['method'] = $methodName;
                    if ($matchedParameters) {
                        $methodData = $data;
                        break;
                    }
                }
            }
        }

        return [
            'methodData'        => $methodData,
            'matchedParameters' => $matchedParameters
        ];
    }