public function matches(string $uri) : bool { if ($this->pattern->matches($uri)) { $this->uriParams = $this->pattern->getMatches(); foreach ($this->routes as $route) { if ($route->matches($uri)) { $this->requestHandler = $route->getRequestHandler(); $this->uriParams = array_merge($this->uriParams, $route->getUriParams()); return true; } } } return false; }
public function getUriParams() : array { return $this->pattern->getMatches(); }