| 1 | <?php |
||
| 7 | final class RequestSerializer |
||
| 8 | { |
||
| 9 | const CRLF = "\r\n"; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Returns the string representation of an HTTP request. |
||
| 13 | * |
||
| 14 | * @param RequestInterface $request Request to convert to a string. |
||
| 15 | * |
||
| 16 | * @return string |
||
| 17 | */ |
||
| 18 | 136 | public static function serialize(RequestInterface $request) |
|
| 22 | |||
| 23 | 136 | private static function requestLine(RequestInterface $request) |
|
| 31 | |||
| 32 | 136 | private static function headers(RequestInterface $request) |
|
| 53 | |||
| 54 | 136 | private static function fixTarget($target) |
|
| 66 | } |
||
| 67 |