method = strtoupper($this->method); } /** * @param mixed $class * @param mixed|null $method * @return Router * @throws Exception */ public function execute(mixed $class, mixed $method = null): Router { // TODO: Implement setHandler() method. $router = Kiri::app()->getRouter(); if (is_string($class)) { $class = di($class); } $router->addRoute($this->uri, [$class, $method], $this->method); return $router; } }