| 1 | <?php |
||
| 14 | class HttpHeaderParser |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * The incoming buffer. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $buffer; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Push incoming data to the parser. |
||
| 25 | * |
||
| 26 | * @param string $data |
||
| 27 | * |
||
| 28 | * @return array |
||
| 29 | */ |
||
| 30 | public function push($data) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Parse the incoming buffer. |
||
| 39 | * |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | public function parse() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Parse one message from the data. |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function parseFirst() |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Get the reset of data. |
||
| 75 | * |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getRemainingChunk() |
||
| 82 | } |