Response

Class Rest\Response Hold the response in a Server

Methods

Constructor of Rest\Response

__contruct(\Rest\Rest\Response $rest = null) 

Arguments

$rest

\Rest\Rest\Response

Adds a header to the response

addHeader(string $header) : \Rest\Rest\Response

Arguments

$header

string

Response

\Rest\Rest\Response

Clean the headers set on the response

cleanHeader() : \Rest\Rest\Response

Response

\Rest\Rest\Response

Show the headers

showHeader() : \Rest\Rest\Response

Response

\Rest\Rest\Response

Check if headers were sent

headerSent() : bool

Response

bool

Set the response

setResponse(mixed $response) : \Rest\Rest\Response

Arguments

$response

mixed

Response

\Rest\Rest\Response

Sends the partial response already, skip buffering, good for big responses

sendResponse(mixed $response) : \Rest\Rest\Response

Arguments

$response

mixed

Response

\Rest\Rest\Response

Set the response to null

cleanResponse() : \Rest\Rest\Response

Response

\Rest\Rest\Response

Add a string to the response, only work if response is a string

appendResponse(string $response) : \Rest\Rest\Response

Arguments

$response

string

Response

\Rest\Rest\Response

Add a string to the response, only work if response is a string

addResponse(string $response) : \Rest\Rest\Response

Arguments

$response

string

Response

\Rest\Rest\Response

Return the reponse setted

getResponse() : mixed

Response

mixed

$response;

Properties

rest

rest

headers

headers

response

response