$this->
setRoutePath($path);
return $this;
} /**
* Sets the route path (and segments).
*/
private function setRoutePath(string
$routePath): void
{ $routePath =
$this->
filterPath($routePath);
$indexPageRoutePath =
$this->
getIndexPageRoutePath($routePath);
$this->path =
$this->basePathWithoutIndexPage .
$indexPageRoutePath;
$this->routePath =
ltrim($routePath, '/'
);
$this->segments =
$this->
convertToSegments($this->routePath
);
} /**
* Converts path to segments
*/