1 | <?php |
||
21 | class Manager |
||
22 | { |
||
23 | /** |
||
24 | * @var LoopInterface |
||
25 | */ |
||
26 | private $loop; |
||
27 | |||
28 | /** |
||
29 | * @var LoggerInterface|null |
||
30 | */ |
||
31 | private $logger; |
||
32 | |||
33 | /** |
||
34 | * @var array|SystemInterface[] |
||
35 | */ |
||
36 | private $systems = []; |
||
37 | |||
38 | /** |
||
39 | * Factory constructor. |
||
40 | * @param LoopInterface|null $loop |
||
41 | * @param LoggerInterface|null $logger |
||
42 | */ |
||
43 | public function __construct(LoopInterface $loop = null, LoggerInterface $logger = null) |
||
48 | |||
49 | /** |
||
50 | * @param SystemInterface $system |
||
51 | * @param null|string $alias |
||
52 | * @return Manager |
||
53 | */ |
||
54 | public function register(SystemInterface $system, ?string $alias = null): Manager |
||
72 | |||
73 | /** |
||
74 | * @param string $system |
||
75 | * @return SystemInterface |
||
76 | */ |
||
77 | public function get(string $system): SystemInterface |
||
81 | |||
82 | /** |
||
83 | * @return LoopInterface |
||
84 | */ |
||
85 | public function getEventLoop(): LoopInterface |
||
89 | |||
90 | /** |
||
91 | * @return void |
||
92 | */ |
||
93 | public function connect(): void |
||
97 | } |
||
98 |