forked from felixfbecker/php-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLanguageClient.php
48 lines (40 loc) Β· 969 Bytes
/
LanguageClient.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
declare(strict_types = 1);
namespace LanguageServer;
use JsonMapper;
class LanguageClient
{
/**
* Handles textDocument/* methods
*
* @var Client\TextDocument
*/
public $textDocument;
/**
* Handles window/* methods
*
* @var Client\Window
*/
public $window;
/**
* Handles workspace/* methods
*
* @var Client\Workspace
*/
public $workspace;
/**
* Handles xcache/* methods
*
* @var Client\XCache
*/
public $xcache;
public function __construct(ProtocolReader $reader, ProtocolWriter $writer)
{
$handler = new ClientHandler($reader, $writer);
$mapper = new JsonMapper;
$this->textDocument = new Client\TextDocument($handler, $mapper);
$this->window = new Client\Window($handler);
$this->workspace = new Client\Workspace($handler, $mapper);
$this->xcache = new Client\XCache($handler);
}
}