Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Serialization; |
6 | |
7 | use PeServer\Core\Binary; |
8 | use PeServer\Core\Throws\SerializeException; |
9 | use PeServer\Core\Throws\DeserializeException; |
10 | |
11 | interface ISerializer |
12 | { |
13 | #region function |
14 | |
15 | /** |
16 | * シリアライズ処理。 |
17 | * |
18 | * @param array<mixed>|object $value |
19 | * @return Binary |
20 | * @throws SerializeException |
21 | */ |
22 | public function save(array|object $value): Binary; |
23 | |
24 | /** |
25 | * デシリアライズ処理。 |
26 | * |
27 | * @param Binary $value |
28 | * @return array<mixed>|object |
29 | * @throws DeserializeException |
30 | */ |
31 | public function load(Binary $value): array|object; |
32 | |
33 | #endregion |
34 | } |