/** * Returns true if Route matches input $uri and $method, false otherwise * @param IRoute $route * @param string $uri * @param string $method * @return bool */ private function isRouteAMatch(IRoute $route, \string $uri, \string $method) : \bool { if ($route->getMethod() == $method) { if ($route->getUri() == $uri) { return true; } $routeUriArray = $this->sliceUri($route->getUri()); $inputUriArray = $this->sliceUri($uri); return $this->compareSegmentLists($routeUriArray, $inputUriArray); } return false; }