client = $client; } /** * Retrieves the content of a text document identified by the URI through a textDocument/xcontent request * * @param string $uri The URI of the document * @return Promise Resolved with the content as a string */ public function retrieve(string $uri): Promise { return $this->client->textDocument->xcontent(new TextDocumentIdentifier($uri)) ->then(function (TextDocumentItem $textDocument) { return $textDocument->text; }); } }