response
in package
HTTP response handler object
Tags
Table of Contents
- $code : int
- Response code
- $headers : array<string|int, mixed>
- Response headers
- $returnData : array<string|int, mixed>
- Response headers
- addHeaders() : $this
- Add response headers
- fetch() : void
- Fetch reponse data
- setCode() : $this
- Set response code
- setReturnData() : $this
- Set return data
Properties
$code
Response code
private
int
$code
= null
$headers
Response headers
private
array<string|int, mixed>
$headers
= []
$returnData
Response headers
private
array<string|int, mixed>
$returnData
= null
Methods
addHeaders()
Add response headers
public
addHeaders(string $header) : $this
Parameters
- $header : string
Return values
$this —fetch()
Fetch reponse data
public
fetch([bool $includeData = true ]) : void
Parameters
- $includeData : bool = true
Return values
void —setCode()
Set response code
public
setCode(int $code) : $this
Parameters
- $code : int
Return values
$this —setReturnData()
Set return data
public
setReturnData(mixed $returnData) : $this
Parameters
- $returnData : mixed