JSONBodyHandler
in package
implements
BodyHandler
Table of Contents
Interfaces
Properties
- $body : mixed
- $bodyObject : mixed
Methods
- __construct() : mixed
- body() : string
- bodyObject() : mixed
- setHeaders() : mixed
- Sets body handler specific headers (like Content-Type).
Properties
$body
private
mixed
$body
$bodyObject
private
mixed
$bodyObject
Methods
__construct()
public
__construct(mixed &$bodyObject) : mixed
Parameters
- $bodyObject : mixed
body()
public
body() : string
Return values
string —The body as a string.
bodyObject()
public
bodyObject() : mixed
Return values
mixed —The body as an object (usually an array).
setHeaders()
Sets body handler specific headers (like Content-Type).
public
setHeaders(mixed &$headers) : mixed
Parameters
- $headers : mixed
-
The headers array to add headers to.