2018-10-17 21:52:26 +02:00
|
|
|
<?php
|
|
|
|
declare(strict_types = 1);
|
2018-11-06 03:57:36 +01:00
|
|
|
namespace Psalm\Internal\LanguageServer;
|
2018-10-17 21:52:26 +02:00
|
|
|
|
|
|
|
use JsonMapper;
|
|
|
|
|
2018-12-02 00:37:49 +01:00
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
*/
|
2018-10-17 21:52:26 +02:00
|
|
|
class LanguageClient
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Handles textDocument/* methods
|
|
|
|
*
|
|
|
|
* @var Client\TextDocument
|
|
|
|
*/
|
|
|
|
public $textDocument;
|
|
|
|
|
|
|
|
public function __construct(ProtocolReader $reader, ProtocolWriter $writer)
|
|
|
|
{
|
|
|
|
$handler = new ClientHandler($reader, $writer);
|
|
|
|
$mapper = new JsonMapper;
|
|
|
|
|
|
|
|
$this->textDocument = new Client\TextDocument($handler, $mapper);
|
|
|
|
}
|
|
|
|
}
|