server = $server; $this->server->on('method:GET', [$this, 'httpGet'], 200); } /** * @param RequestInterface $request * @param ResponseInterface $response * @return false */ public function httpGet(RequestInterface $request, ResponseInterface $response) { $string = 'This is the WebDAV interface. It can only be accessed by ' . 'WebDAV clients such as the Nextcloud desktop sync client.'; $stream = fopen('php://memory', 'r+'); fwrite($stream, $string); rewind($stream); $response->setStatus(Http::STATUS_OK); $response->setBody($stream); return false; } }