public function getParsedMessageArray()
{
if ($this->body) {
rewind($this->body);
}
$result = ['protocol' => $this->protocol, 'headers' => $this->headers, 'body' => $this->body, 'trace' => $this->traceBuffer, 'buffer' => $this->buffer, 'headersOnly' => false];
if ($this->mode === self::MODE_REQUEST) {
$result['method'] = $this->requestMethod;
$result['uri'] = $this->requestUri;
} else {
$result['status'] = $this->responseCode;
$result['reason'] = $this->responseReason;
}
return $result;
}