uri = 'rpc/p' . $this->port . '/' . ltrim($this->cmd, '/'); } /** * @param array $handler * @return Router * @throws Exception */ public function execute(mixed $class, mixed $method = null): Router { // TODO: Implement setHandler() method. $router = Snowflake::app()->getRouter(); $router->addRoute($this->uri, [$class, $method], Request::HTTP_CMD) ->setDataType($this->protocol); return $router; } }