/** * @param Route $route * @param string $preparedUriPath * @param string $rawUriPath * @param string $httpMethod * @return boolean */ protected function testRoute(Route $route, $preparedUriPath, $rawUriPath, $httpMethod) { $routeHttpMethod = $route->getHttpMethod(); if (empty($routeHttpMethod) || in_array($httpMethod, $routeHttpMethod)) { return strcasecmp($route->getPath(), $preparedUriPath) === 0 || RoutePathParser::match($route->getPath(), $preparedUriPath) || (strcasecmp($route->getPath(), $rawUriPath) === 0 || RoutePathParser::match($route->getPath(), $rawUriPath)); } return false; }