public function route(): RouteRegistration
    {
        $route = new RouteRegistration($this->router, $this, $this->defaults);
        $route->controller($this->options['controller'] ?? '');

        return $route;
    }
public function route(): RouteRegistration
    {
        $route = new RouteRegistration($this->router, $this, $this->defaults);
        $route->controller($this->options['controller'] ?? '');

        return $route;
    }
public function route ( ) : RouteRegistration { $ route = new RouteRegistration ( $ this -> router , $ this , $ this -> defaults ) ; $ route -> controller ( $ this -> options [ 'controller' ] ?? '' ) ; return $ route ; }
Register a custom route.

@return RouteRegistration
Register a custom route .