FullHttpMessageFormatter
in package
implements
Formatter
A formatter that prints the complete HTTP message.
Tags
Table of Contents
Interfaces
- Formatter
- Formats a request and/or a response as a string.
Properties
- $binaryDetectionRegex : string
- $maxBodyLength : int|null
- The maximum length of the body.
Methods
- __construct() : mixed
- formatRequest() : string
- Formats a request.
- formatResponse() : string
- formatResponseForRequest() : string
- Formats a response in context of its request.
- addBody() : string
- Add the message body if the stream is seekable.
Properties
$binaryDetectionRegex
private
string
$binaryDetectionRegex
$maxBodyLength
The maximum length of the body.
private
int|null
$maxBodyLength
Methods
__construct()
public
__construct([int|null $maxBodyLength = 1000 ][, string $binaryDetectionRegex = '/([ - -])/' ]) : mixed
Parameters
- $maxBodyLength : int|null = 1000
- $binaryDetectionRegex : string = '/([ - -])/'
-
By default, this is all non-printable ASCII characters and <DEL> except for \t, \r, \n
formatRequest()
Formats a request.
public
formatRequest(RequestInterface $request) : string
Parameters
- $request : RequestInterface
Return values
stringformatResponse()
public
formatResponse(ResponseInterface $response) : string
Parameters
- $response : ResponseInterface
Return values
stringformatResponseForRequest()
Formats a response in context of its request.
public
formatResponseForRequest(ResponseInterface $response, RequestInterface $request) : string
Parameters
- $response : ResponseInterface
- $request : RequestInterface
Return values
stringaddBody()
Add the message body if the stream is seekable.
private
addBody(MessageInterface $request, string $message) : string
Parameters
- $request : MessageInterface
- $message : string