1 | <?php declare(strict_types=1); |
||
13 | final class StreamingClient |
||
14 | { |
||
15 | /** |
||
16 | * @var LoopInterface |
||
17 | */ |
||
18 | protected $loop; |
||
19 | |||
20 | /** |
||
21 | * @var CommandBus |
||
22 | */ |
||
23 | protected $commandBus; |
||
24 | |||
25 | /** |
||
26 | * @var AsyncStreamingClient |
||
27 | */ |
||
28 | protected $client; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $hydrateClassConstantCache = []; |
||
|
|||
34 | |||
35 | /** |
||
36 | * StreamingClient constructor. |
||
37 | * @param LoopInterface $loop |
||
38 | * @param CommandBus $commandBus |
||
39 | * @param AsyncStreamingClient $client |
||
40 | */ |
||
41 | public function __construct(LoopInterface $loop, CommandBus $commandBus, AsyncStreamingClient $client) |
||
47 | |||
48 | public function sample(callable $listener) |
||
52 | |||
53 | public function filtered(callable $listener, array $filter = []) |
||
57 | |||
58 | protected function stream(ObservableInterface $observable, callable $listener) |
||
77 | |||
78 | protected function loopUpHydrateClassConstant(ResourceInterface $resource) |
||
87 | } |
||
88 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.