Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
TrivialMediaHandlerState | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getHandlerState | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setHandlerState | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * Trivial implementation of MediaHandlerState. |
5 | * |
6 | * @since 1.37 |
7 | */ |
8 | class TrivialMediaHandlerState implements MediaHandlerState { |
9 | /** @var array */ |
10 | private $state = []; |
11 | |
12 | public function getHandlerState( string $key ) { |
13 | return $this->state[$key] ?? null; |
14 | } |
15 | |
16 | public function setHandlerState( string $key, $value ) { |
17 | $this->state[$key] = $value; |
18 | } |
19 | } |