config = $config; $this->l10n = $l10nFactory->get('dav'); $this->eventDispatcher = $eventDispatcher; } public function createServer(string $baseURI, string $requestURI, IRootFolder $rootFolder, DirectMapper $mapper, ITimeFactory $timeFactory, IThrottler $throttler, IRequest $request): Server { $home = new DirectHome($rootFolder, $mapper, $timeFactory, $throttler, $request, $this->eventDispatcher); $server = new Server($home); $server->httpRequest->setUrl($requestURI); $server->setBaseUri($baseURI); $server->addPlugin(new MaintenancePlugin($this->config, $this->l10n)); return $server; } }