getRouter(static::$serverName); return $router->{$name}(...$arguments); } public static function addServer(string $serverName, callable $callback) { $temp = $serverName; static::$serverName = $serverName; $callback(); static::$serverName = $temp; unset($temp); } public static function init(DispatcherFactory $factory) { static::$factory = $factory; } public static function add(string $route, $handler, array $options = []): void { static::addRoute($route, $handler, $options); } }