Basic HTML response. the HTML content should be provided by a simple php file.
| package |
jelix |
|---|---|
| subpackage |
core_response |
__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
addContent(string $content, boolean $before = false)
stringadditionnal html content
booleantrue if you want to add it before the content, else false for after
addHeadContent(string $content, boolean $toTop = false)
| since | 1.0b1 |
|---|---|
string
booleantrue if you want to add it at the top of the head content, else false for the bottom
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()
doAfterActions()
.) after any actions
| since | 1.1 |
|---|---|
getFormatType() : string
stringthe name
getPlugin(string $name) : \jIHTMLResponsePlugin|null
| since | 1.3a1 |
|---|
stringthe name of the plugin
\jIHTMLResponsePlugin|nullthe plugin or null if it isn't loaded
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
isXhtml() : boolean
booleantrue if it is xhtml
output() : boolean
| Throws |
|
|---|
booleantrue if the generated content is ok
outputErrors()
sendHttpHeaders()
setContentType()
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.
setXhtmlOutput(boolean $xhtml = true)
booleantrue if you want xhtml, false if you want html
_type : string
| var |
ident of the response type |
|---|
string
_charset : string
| var |
|---|
string
_lang : string
| var |
|---|
string
_isXhtml :
xhtmlContentType : boolean
it true, a verification of HTTP_ACCEPT is done.
| var |
|---|
boolean
_headTop :
_headBottom :
_bodyTop :
_bodyBottom :
htmlFile : string
.
| var |
|---|
string
plugins : array<mixed,\jIHTMLResponsePlugin>
_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 :