1 | <?php |
||
20 | class HeadersFrame extends \Hyphper\Frame implements PaddingInterface, PriorityInterface |
||
21 | { |
||
22 | use PaddingTrait, PriorityTrait; |
||
23 | |||
24 | protected $defined_flags = [ |
||
25 | Flag::END_STREAM, |
||
26 | Flag::END_HEADERS, |
||
27 | Flag::PADDED, |
||
28 | Flag::PRIORITY |
||
29 | ]; |
||
30 | |||
31 | protected $type = 0x01; |
||
32 | |||
33 | protected $stream_association = self::HAS_STREAM; |
||
34 | protected $data; |
||
35 | |||
36 | |||
37 | |||
38 | 7 | public function __construct(array $options = []) |
|
44 | |||
45 | 3 | public function serializeBody(): string |
|
60 | |||
61 | /** |
||
62 | * Given the body of a frame, parses it into frame data. This populates |
||
63 | * the non-header parts of the frame: that is, it does not populate the |
||
64 | * stream ID or flags. |
||
65 | * |
||
66 | * |
||
67 | * @param string $data |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | 4 | public function parseBody(string $data) |
|
88 | |||
89 | /** |
||
90 | * @param mixed|string $data |
||
91 | * |
||
92 | * @return HeadersFrame |
||
93 | */ |
||
94 | 3 | public function setData($data) |
|
100 | |||
101 | /** |
||
102 | * @return mixed|string |
||
103 | */ |
||
104 | 3 | public function getData() |
|
108 | } |
||
109 |