Json response
| package |
jelix |
|---|---|
| subpackage |
core_response |
| see | |
| since | 1.0b1 |
__construct()
_checkRequestType()
_normalizeDate(mixed $date) : string
mixedCan be a jDateTime object, a DateTime object or a string understandable by strtotime
stringa date in GMT format
addHttpHeader(string $htype, string $hcontent, integer $overwrite = true)
will be send during the output of the response
stringthe header type ("Content-Type", "Date-modified"...)
stringvalue of the header type
integerfalse or 0 if the value should be set only if it doesn't still exist -1 to add the header with the existing values true or 1 to replace the existing header
cleanCacheHeaders()
clearHttpHeaders()
getFormatType() : string
stringthe name
getType() : string
stringthe name
isValidCache(mixed $dateLastModified = null, $etag = null, boolean $cleanCacheHeader = true) : boolean
mixedCan be a jDateTime object, a DateTime object or a string understandable by strtotime
booleanTrue for clean/delete other cache headers. Default : true.
booleanTrue if the client ressource version is fresh, false otherwise
output()
outputErrors()
sendHttpHeaders()
setExpires( $date, $cleanCacheHeader = true)
| see | \_normalizeDate |
|---|---|
setHttpStatus(string $code, string $msg)
stringthe status code (200, 404...)
stringthe message following the status code ("OK", "Not Found"..)
setLifetime(integer $time, boolean $sharedCache = false, $cleanCacheHeader = true)
integerTime during which the page will be cached. Express in seconds.
booleanTrue if the lifetime concern a public/shared cache. Default : false.
data : mixed
| var |
|---|
mixed
_type : string
| var |
ident of the response type |
|---|
string
_httpHeaders : array
| var |
list of http headers that will be send to the client |
|---|
array
_httpHeadersSent : boolean
| var |
indicates if http headers have already been sent to the client |
|---|
boolean
_httpStatusCode : string
| var |
the http status code to send |
|---|
string
_httpStatusMsg : string
| var |
the http status message to send |
|---|
string
_outputOnlyHeaders : boolean
| var |
Should we output only the headers or the entire response |
|---|
boolean
httpVersion :
forcedHttpVersion :