-
Notifications
You must be signed in to change notification settings - Fork 8
/
Factory.php
65 lines (56 loc) · 1.8 KB
/
Factory.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
declare(strict_types=1);
namespace Mougrim\XdebugProxy\Factory;
use Mougrim\XdebugProxy\Config\Config;
use Mougrim\XdebugProxy\Config\IdeServer as IdeServerConfig;
use Mougrim\XdebugProxy\Handler\IdeHandler;
use Mougrim\XdebugProxy\Handler\XdebugHandler;
use Mougrim\XdebugProxy\Proxy;
use Mougrim\XdebugProxy\RequestPreparer\Error as RequestPreparerError;
use Mougrim\XdebugProxy\RequestPreparer\Exception as RequestPreparerException;
use Mougrim\XdebugProxy\RequestPreparer\RequestPreparer;
use Mougrim\XdebugProxy\Xml\XmlConverter;
use Psr\Log\LoggerInterface;
/**
* @author Mougrim <[email protected]>
*/
interface Factory
{
/**
* @param array<array-key, array> $config
*/
public function createConfig(array $config): Config;
public function createXmlConverter(LoggerInterface $logger): XmlConverter;
/**
* @param RequestPreparer[] $requestPreparers
*/
public function createIdeHandler(
LoggerInterface $logger,
IdeServerConfig $config,
XmlConverter $xmlConverter,
array $requestPreparers
): IdeHandler;
/**
* Request preparers will be called:
* - on request to ide from first to last;
* - on request to xdebug from last to first.
*
* @throws RequestPreparerException
* @throws RequestPreparerError
*
* @return RequestPreparer[]
*/
public function createRequestPreparers(LoggerInterface $logger, Config $config): array;
public function createXdebugHandler(
LoggerInterface $logger,
XmlConverter $xmlConverter,
IdeHandler $ideHandler
): XdebugHandler;
public function createProxy(
LoggerInterface $logger,
Config $config,
XmlConverter $xmlConverter,
IdeHandler $ideHandler,
XdebugHandler $xdebugHandler
): Proxy;
}