1 | <?php |
||
12 | final class NullConnection implements ConnectionInterface |
||
13 | { |
||
14 | private $receive; |
||
15 | |||
16 | 2 | public function addListener(string $name, \Closure $callback): void |
|
19 | |||
20 | 1 | public function connect(): void |
|
23 | |||
24 | 1 | public function disconnect(): void |
|
27 | |||
28 | public function send(string $request): int |
||
29 | { |
||
30 | $this->setReceive($request); |
||
31 | |||
32 | return 0; |
||
33 | } |
||
34 | |||
35 | public function receive(): string |
||
36 | { |
||
37 | return $this->receive; |
||
38 | } |
||
39 | |||
40 | 1 | public function upgrade(int $type): void |
|
43 | |||
44 | 1 | public function timeout(float $timeout): void |
|
47 | |||
48 | 1 | public function getMetaData(array $keys = []): array |
|
52 | |||
53 | private function setReceive(string $request): void |
||
54 | { |
||
80 | } |
||
81 |