1 | <?php |
||
23 | class AltSvcFrame extends \Hyphper\Frame |
||
24 | { |
||
25 | protected $defined_flags = []; |
||
26 | protected $type = 0xA; |
||
27 | protected $stream_association = self::EITHER_STREAM; |
||
28 | protected $origin; |
||
29 | protected $field; |
||
30 | |||
31 | /** |
||
32 | * AltSvcFrame constructor. |
||
33 | * |
||
34 | * @param array $options |
||
35 | */ |
||
36 | 6 | public function __construct(array $options = []) |
|
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 4 | public function serializeBody(): string |
|
51 | |||
52 | /** |
||
53 | * Given the body of a frame, parses it into frame data. This populates |
||
54 | * the non-header parts of the frame: that is, it does not populate the |
||
55 | * stream ID or flags. |
||
56 | * |
||
57 | * |
||
58 | * @param string $data |
||
59 | * @return void |
||
60 | */ |
||
61 | 2 | public function parseBody(string $data) |
|
78 | |||
79 | /** |
||
80 | * @param mixed|string $origin |
||
81 | * |
||
82 | * @return AltSvcFrame |
||
83 | */ |
||
84 | 2 | public function setOrigin($origin) |
|
90 | |||
91 | /** |
||
92 | * @return mixed|string |
||
93 | */ |
||
94 | 1 | public function getOrigin() |
|
98 | |||
99 | /** |
||
100 | * @param mixed|string $field |
||
101 | * |
||
102 | * @return AltSvcFrame |
||
103 | */ |
||
104 | 2 | public function setField($field) |
|
110 | |||
111 | /** |
||
112 | * @return mixed|string |
||
113 | */ |
||
114 | 1 | public function getField() |
|
118 | } |
||
119 |