Documentation

response
in package

HTTP response handler object

Tags
author

Stefan Seehafer sea75300@yahoo.de

copyright

(c) 2020, Stefan Seehafer

license

http://www.gnu.org/licenses/gpl.txt GPLv3

since
4.4

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
Return values
$this

Search results