1 | <?php |
||
22 | class Factory |
||
23 | { |
||
24 | /** @var array [description] */ |
||
25 | private $servers = []; |
||
26 | |||
27 | /** |
||
28 | * Factory constructor. |
||
29 | */ |
||
30 | 7 | public function __construct() |
|
36 | |||
37 | /** |
||
38 | * Builds a parser instance. |
||
39 | * |
||
40 | * @param string $name a server specification name |
||
41 | * |
||
42 | * @return ParserInterface a parser instance |
||
43 | */ |
||
44 | 7 | public function createParser($name) |
|
60 | |||
61 | /** |
||
62 | * Builds a server instance. |
||
63 | * |
||
64 | * @param string $name a server specification name |
||
65 | * |
||
66 | * @return Server\ServerInterface a server instance |
||
67 | */ |
||
68 | 7 | public function createServer($name) |
|
85 | |||
86 | /** |
||
87 | * Retrieves known servers from res/servers.yml specifications. |
||
88 | * |
||
89 | * @return array known server names |
||
90 | */ |
||
91 | 7 | public function getKnownServers() |
|
95 | } |
||
96 |