2016-12-08 00:51:32 +00:00
|
|
|
<?php
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
namespace LanguageServer\ContentRetriever;
|
|
|
|
|
|
|
|
use Sabre\Event\Promise;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for retrieving the content of a text document
|
|
|
|
*/
|
|
|
|
interface ContentRetriever
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Retrieves the content of a text document identified by the URI
|
|
|
|
*
|
|
|
|
* @param string $uri The URI of the document
|
|
|
|
* @return Promise <string> Resolved with the content as a string
|
|
|
|
*/
|
2019-06-19 11:02:46 +00:00
|
|
|
public function retrieve(string $uri): \Generator;
|
2016-12-08 00:51:32 +00:00
|
|
|
}
|