router = $router; $this->callback = $callback; } public function __call($method, $params) { $this->router->{$method}(...$params); return $this; } public function __destruct() { $this->router->executeGroupCallback($this->callback); } }