update to PHP-8.1
[m6w6/seekat] / lib / API / ContentType / Handler.php
1 <?php
2
3 namespace seekat\API\ContentType;
4
5 use http\Message\Body;
6
7 interface Handler {
8 /**
9 * List handled types
10 * @return string[]
11 */
12 function types() : array;
13
14 /**
15 * Decode HTTP message body
16 */
17 function decode(Body $body) : mixed;
18
19 /**
20 * Encode HTTP message body
21 */
22 function encode(mixed $data) : Body;
23 }