1
0
Fork 0
php-language-server/src/LanguageClient.php

49 lines
969 B
PHP
Raw Normal View History

<?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;
2017-02-03 23:20:38 +00:00
/**
* Handles xcache/* methods
*
* @var Client\XCache
*/
public $xcache;
2016-10-31 10:47:21 +00:00
public function __construct(ProtocolReader $reader, ProtocolWriter $writer)
{
2016-10-31 10:47:21 +00:00
$handler = new ClientHandler($reader, $writer);
$mapper = new JsonMapper;
2016-10-31 10:47:21 +00:00
$this->textDocument = new Client\TextDocument($handler, $mapper);
2016-10-31 10:47:21 +00:00
$this->window = new Client\Window($handler);
$this->workspace = new Client\Workspace($handler, $mapper);
2017-02-03 23:20:38 +00:00
$this->xcache = new Client\XCache($handler);
}
}