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