HTML5 response
| 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
addCSSLink(string $src, array $params = array(), mixed $forIE = false)
$forIe parameter exists since 1.0b2
stringthe link
arrayadditionnals attributes for the link tag
mixedif true, the style sheet will be only for IE browser. string values possible (ex:'lt IE 7')
addCSSLinkModule(string $module, mixed $src, $params = array(), boolean $forIE = false)
| params |
array $params additionnal parameters for the generated tag (a media attribute for stylesheet for example) |
|---|---|
stringthe module where file is stored
mixedthe relative path inside the {module}/www/ directory
booleanif true, the script sheet will be only for IE browser. string values possible (ex:'lt IE 7')
addCSSThemeLinkModule(string $module, mixed $src, $params = array(), boolean $forIE = false)
| params |
array $params additionnal parameters for the generated tag (a media attribute for stylesheet for example) |
|---|---|
stringthe module where file is stored
mixedthe relative path inside the {module}/www/themes/{currenttheme}/ directory
booleanif true, the script sheet will be only for IE browser. string values possible (ex:'lt IE 7')
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
addJSCode(string $code, boolean $before = false)
stringjavascript source code
booleanwill insert the code before js links if true
addJSLink(string $src, array $params = array(), boolean $forIE = false)
$forIe parameter exists since 1.0b2
stringthe link
arrayadditionnals attributes for the script tag
booleanif true, the script sheet will be only for IE browser. string values possible (ex:'lt IE 7')
addJSLinkModule(string $module, mixed $src, array $params = array(), boolean $forIE = false)
stringthe module where file is stored
mixedthe relative path inside the {module}/www/ directory
arrayadditionnal parameters for the generated tag (a media attribute for stylesheet for example)
booleanif true, the script sheet will be only for IE browser. string values possible (ex:'lt IE 7')
addLink(string $href, string $rel, string $type = '', string $title = '')
stringurl of the link
stringrelation name
stringmime type of the ressource
string
addMeta( $params)
addMetaAuthor(string $content)
| author |
Olivier Demah |
|---|---|
| since | 1.2 |
stringauthor(s)
addMetaDescription(string $content)
| author |
Yann |
|---|---|
| since | 1.0b1 |
stringa description
addMetaGenerator(string $content)
| author |
Olivier Demah |
|---|---|
| since | 1.2 |
stringgenerator
addMetaKeywords(string $content)
| author |
Yann |
|---|---|
| since | 1.0b1 |
stringkeywords
addStyle(string $selector, string $def = null)
stringcss selector
stringcss properties for the given selector
cleanCacheHeaders()
clearHtmlHeader(array $what = null)
arraylist of one or many of this strings : 'CSSLink', 'CSSIELink', 'Styles', 'JSLink', 'JSIELink', 'JSCode', 'Others','MetaKeywords','MetaDescription'. If null, it cleans all values.
clearHttpHeaders()
doAfterActions()
.) after any actions
| since | 1.1 |
|---|---|
endTag() : string
string
getCSSIELinks() : array
arraykey = url, value=link attributes + optional parameter _iecondition
getCSSLinks() : array
arraykey = url, value=link attributes
getFormatType() : string
stringthe name
getJSIELinks() : array
arraykey = url, value=link attributes + optional parameter _iecondition
getJSLinks() : array
arraykey = url, value=link attributes
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
outputCssLinkTag( $fileUrl, $cssParams)
outputDoctype()
| since | 1.1 |
|---|---|
outputErrors()
outputHtmlHeader()
outputJsScriptTag( $fileUrl, $scriptParams)
outputMetaTag(array<mixed,string> $params)
| since | 1.6.17 |
|---|---|
array<mixed,string>list of attributes to add to a meta element
sendHttpHeaders()
setBodyAttributes(array $attrArray)
arrayan associative array of attributes and their values
setContentType()
setCSSIELinks(array $list)
arraykey = url, value=link attributes
setCSSLinks(array $list)
arraykey = url, value=link attributes
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"..)
setJSIELinks(array $list)
arraykey = url, value=link attributes
setJSLinks(array $list)
arraykey = url, value=link attributes
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.
setTitle(string $title)
string
setXhtmlOutput(boolean $xhtml = true)
booleantrue if you want xhtml, false if you want html
_type : string
| var |
ident of the response type |
|---|
string
title : string
| var |
|---|
string
favicon : string
| var | |
|---|---|
| since |
string
bodyTpl : string
| var |
|---|
string
bodyErrorTpl : string
| var |
|---|
string
bodyTagAttributes : array
| var |
|---|
array
IECompatibilityMode : string
| var |
indicate the value for the X-UA-Compatible meta element, which indicate the compatiblity mode of IE. Exemple: "IE=edge" In future version, default will be "IE=edge". |
|---|---|
| since |
string
_CSSLink : array
| var |
key = url, value=link attributes |
|---|
array
_CSSIELink : array
| var |
key = url, value=link attributes + optional parameter _iecondition |
|---|
array
_Styles :
_JSLink : array
| var |
key = url, value=link attributes |
|---|
array
_JSIELink : array
| var |
key = url, value=link attributes + optional parameter _iecondition |
|---|
array
_JSCodeBefore : array
| var |
list of js source code |
|---|
array
_JSCode : array
| var |
list of js source code |
|---|
array
_MetaKeywords : array
| var |
array of strings |
|---|
array
_MetaDescription : array
| var |
array of strings |
|---|
array
_MetaAuthor : string
| var |
|---|
string
_MetaGenerator : string
| var |
|---|
string
_MetaOldContentType : boolean
| var |
false if it should be output or true for the default old behavior : <meta content="text/html; charset=""../> |
|---|---|
| since |
boolean
_Meta : array<mixed,array>
| var |
list of arrays containing attributes for each meta elements |
|---|---|
| since |
array<mixed,array>
_Link : array
| var |
keys are the href value, valu is an array ('rel','type','title') |
|---|
array
_endTag : string
| var |
|---|
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 :