src/Route.php
public function getSubRoute(string $route_part)
    {
        $sub_route = $this->route === '/' ? '/' . $route_part : $this->route . '/' . $route_part;

        if (!isset($this->children[$route_part]))
            $this->children[$route_part] = new Route($sub_route, $this->depth + 1);

        return $this->children[$route_part];
    }
public function getSubRoute(string $route_part)
    {
        $sub_route = $this->route === '/' ? '/' . $route_part : $this->route . '/' . $route_part;

        if (!isset($this->children[$route_part]))
            $this->children[$route_part] = new Route($sub_route, $this->depth + 1);

        return $this->children[$route_part];
    }
Get a sub route for the specified route part. If a
child node does not exist yet, it will be created.
@param string $route_part The child route part
@return Route The child node