Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class DHDriver extends AbstractDriverMiddleware |
||
14 | { |
||
15 | private DriverInterface $driver; |
||
16 | |||
17 | /** @var array<callable> */ |
||
18 | private array $flusherList = []; |
||
19 | |||
20 | public function __construct(DriverInterface $driver) |
||
21 | { |
||
22 | parent::__construct($driver); |
||
23 | $this->driver = $driver; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * {@inheritDoc} |
||
28 | */ |
||
29 | public function connect(array $params) |
||
30 | { |
||
31 | return new DHConnection( |
||
32 | $this->driver->connect($params), |
||
33 | $this |
||
34 | ); |
||
35 | } |
||
36 | |||
37 | public function addDHFlusher(callable $flusher): void |
||
38 | { |
||
39 | $this->flusherList[] = $flusher; |
||
40 | } |
||
41 | |||
42 | public function resetDHFlusherList(): void |
||
45 | } |
||
46 | |||
47 | public function getFlusherList(): array |
||
48 | { |
||
52 |