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