Class jResponseHtml

Description

HTML5 response

Located in /core/response/jResponseHtml.class.php (line 28)

jResponse
   |
   --jResponseBasicHtml
      |
      --jResponseHtml
Direct descendents
Class Description
jResponseHtml4 Response class for HTML 4 or XHTML 1.x
Variable Summary
string $bodyErrorTpl
string $bodyTpl
string $favicon
string $title
array $_CSSIELink
array $_CSSLink
string $_endTag
array $_JSCode
array $_JSIELink
array $_JSLink
array $_Link
string $_MetaAuthor
mixed $_Styles
string $_type
Method Summary
jResponseHtml __construct ()
void addCSSLink (string $src, [array $params = array ()], [mixed $forIE = false])
void addJSCode (string $code, [boolean $before = false])
void addJSLink (string $src, [array $params = array()], [boolean $forIE = false])
void addLink (string $href, string $rel, [string $type = ''], [string $title = ''])
void addMetaAuthor (string $content)
void addMetaDescription (string $content)
void addMetaGenerator (string $content)
void addMetaKeywords (string $content)
void addStyle (string $selector, [string $def = null])
void clearHtmlHeader ([array $what = null])
string endTag ()
void getCSSIELinks ()
void getCSSLinks ()
array getJSIELinks ()
array getJSLinks ()
boolean output ()
void outputCssLinkTag ( $fileUrl,  $cssParams)
void outputDoctype ()
void outputJsScriptTag ( $fileUrl,  $scriptParams)
void setBodyAttributes (array $attrArray)
void setCSSIELinks (array $list)
void setCSSLinks (array $list)
void setJSIELinks (array $list)
void setJSLinks (array $list)
void setTitle (string $title)
void setXhtmlOutput ([boolean $xhtml = true])
Variables
jTpl $body = null (line 52)

The template engine used to generate the body content

  • access: public
string $bodyErrorTpl = '' (line 65)

Selector of the template used when there are some errors, instead of $bodyTpl

  • access: public
array $bodyTagAttributes = array() (line 72)

body attributes

This attributes are written on the body tags

  • access: public
string $bodyTpl = '' (line 59)

selector of the main template file

This template should contains the body content, and is used by the $body template engine

  • access: public
string $favicon = '' (line 46)

favicon url linked to the document

  • since: 1.0b2
  • access: public
string $title = '' (line 39)

Title of the document

  • access: public
array $_CSSIELink = array () (line 84)

list of css stylesheet for IE

  • var: key = url, value=link attributes + optional parameter _iecondition
  • access: protected
array $_CSSLink = array () (line 78)

list of css stylesheet

  • var: key = url, value=link attributes
  • access: protected
string $_endTag = "/>\n" (line 149)

the end tag to finish tags. it is different if we are in XHTML mode or not

  • access: protected
array $_JSCode = array () (line 113)

inline js code to insert after js links

  • var: list of js source code
  • access: protected
array $_JSCodeBefore = array () (line 107)

inline js code to insert before js links

  • var: list of js source code
  • access: protected
array $_JSIELink = array () (line 101)

list of js script for IE

  • var: key = url, value=link attributes + optional parameter _iecondition
  • access: protected
array $_JSLink = array () (line 95)

list of js script

  • var: key = url, value=link attributes
  • access: protected
array $_Link = array() (line 143)

list of information to generate link tags

  • var: keys are the href value, valu is an array ('rel','type','title')
  • access: protected
string $_MetaAuthor = '' (line 131)

content of the meta author tag

  • access: protected
array $_MetaDescription = array() (line 125)

list of descriptions to add into a meta description tag

  • var: array of strings
  • access: protected
string $_MetaGenerator = '' (line 137)

content of the meta generator tag

  • access: protected
array $_MetaKeywords = array() (line 119)

list of keywords to add into a meta keyword tag

  • var: array of strings
  • access: protected
mixed $_Styles = array () (line 89)

list of CSS code

  • access: protected
string $_type = 'html' (line 33)

jresponse id

  • access: protected

Redefinition of:
jResponseBasicHtml::$_type
jresponse id

Inherited Variables

Inherited from jResponseBasicHtml

jResponseBasicHtml::$htmlFile
jResponseBasicHtml::$plugins
jResponseBasicHtml::$xhtmlContentType
jResponseBasicHtml::$_bodyBottom
jResponseBasicHtml::$_bodyTop
jResponseBasicHtml::$_charset
jResponseBasicHtml::$_headBottom
jResponseBasicHtml::$_headTop
jResponseBasicHtml::$_isXhtml
jResponseBasicHtml::$_lang

Inherited from jResponse

jResponse::$forcedHttpVersion
jResponse::$httpVersion
jResponse::$_httpHeaders
jResponse::$_httpHeadersSent
jResponse::$_httpStatusCode
jResponse::$_httpStatusMsg
jResponse::$_outputOnlyHeaders
Methods
Constructor __construct (line 155)

constructor;

setup the charset, the lang, the template engine

jResponseHtml __construct ()

Redefinition of:
jResponseBasicHtml::__construct()
constructor;
addCSSLink (line 315)

add a link to a css stylesheet in the document head

$forIe parameter exists since 1.0b2

  • access: public
void addCSSLink (string $src, [array $params = array ()], [mixed $forIE = false])
  • string $src: the link
  • array $params: additionnals attributes for the link tag
  • mixed $forIE: if true, the style sheet will be only for IE browser. string values possible (ex:'lt IE 7')
addJSCode (line 359)

add inline javascript code (inside a <script> tag)

  • access: public
void addJSCode (string $code, [boolean $before = false])
  • string $code: javascript source code
  • boolean $before: will insert the code before js links if true
addJSLink (line 244)

add a link to a javascript script in the document head

$forIe parameter exists since 1.0b2

  • access: public
void addJSLink (string $src, [array $params = array()], [boolean $forIE = false])
  • string $src: the link
  • array $params: additionnals attributes for the script tag
  • boolean $forIE: if true, the script sheet will be only for IE browser. string values possible (ex:'lt IE 7')
addLink (line 231)

add a generic link to the head

  • access: public
void addLink (string $href, string $rel, [string $type = ''], [string $title = ''])
  • string $href: url of the link
  • string $rel: relation name
  • string $type: mime type of the ressource
  • string $title
addMetaAuthor (line 390)

add author(s) in a author meta tag

  • author: Olivier Demah
  • since: 1.2
  • access: public
void addMetaAuthor (string $content)
  • string $content: author(s)
addMetaDescription (line 381)

add a description in a description meta tag

  • author: Yann
  • since: 1.0b1
  • access: public
void addMetaDescription (string $content)
  • string $content: a description
addMetaGenerator (line 399)

add generator a generator meta tag

  • author: Olivier Demah
  • since: 1.2
  • access: public
void addMetaGenerator (string $content)
  • string $content: generator
addMetaKeywords (line 372)

add some keywords in a keywords meta tag

  • author: Yann
  • since: 1.0b1
  • access: public
void addMetaKeywords (string $content)
  • string $content: keywords
addStyle (line 334)

add inline css style into the document (inside a <style> tag)

  • access: public
void addStyle (string $selector, [string $def = null])
  • string $selector: css selector
  • string $def: css properties for the given selector
clearHtmlHeader (line 556)

used to erase some head properties

  • access: public
void clearHtmlHeader ([array $what = null])
  • array $what: list of one or many of this strings : 'CSSLink', 'CSSIELink', 'Styles', 'JSLink', 'JSIELink', 'JSCode', 'Others','MetaKeywords','MetaDescription'. If null, it cleans all values.
endTag (line 584)

return the end of a html tag : "/>" or ">", depending if it will generate xhtml or html

  • access: public
string endTag ()
getCSSIELinks (line 298)

returns all CSS links for IE

  • var: key = url, value=link attributes + optional parameter _iecondition
  • access: public
void getCSSIELinks ()
getCSSLinks (line 286)

returns all CSS links

  • var: key = url, value=link attributes
  • access: public
void getCSSLinks ()
getJSIELinks (line 274)

returns all JS links for IE

  • return: key = url, value=link attributes + optional parameter _iecondition
  • access: public
array getJSIELinks ()
getJSLinks (line 262)

returns all JS links

  • return: key = url, value=link attributes
  • access: public
array getJSLinks ()
output (line 165)

output the html content

  • return: true if the generated content is ok
  • access: public
boolean output ()

Redefinition of:
jResponseBasicHtml::output()
output the html content
outputCssLinkTag (line 429)
  • access: protected
void outputCssLinkTag ( $fileUrl,  $cssParams)
  • $fileUrl
  • $cssParams
outputDoctype (line 406)

generate the doctype. You can override it if you want to have your own doctype, like XHTML+MATHML.

  • since: 1.1
  • access: protected
void outputDoctype ()

Redefined in descendants as:
outputHtmlHeader (line 445)

generate the content of the <head> content

  • access: protected
void outputHtmlHeader ()
outputJsScriptTag (line 417)
  • access: protected
void outputJsScriptTag ( $fileUrl,  $scriptParams)
  • $fileUrl
  • $scriptParams
setBodyAttributes (line 344)

set attributes on the body tag

  • access: public
void setBodyAttributes (array $attrArray)
  • array $attrArray: an associative array of attributes and their values
setCSSIELinks (line 304)

set all CSS links for IE

  • access: public
void setCSSIELinks (array $list)
  • array $list: key = url, value=link attributes
setCSSLinks (line 292)

set all CSS links

  • access: public
void setCSSLinks (array $list)
  • array $list: key = url, value=link attributes
setJSIELinks (line 280)

set all JS links for IE

  • access: public
void setJSIELinks (array $list)
  • array $list: key = url, value=link attributes
setJSLinks (line 268)

set all JS links

  • access: public
void setJSLinks (array $list)
  • array $list: key = url, value=link attributes
setTitle (line 219)

set the title of the page

  • access: public
void setTitle (string $title)
  • string $title
setXhtmlOutput (line 572)

change the type of html for the output

  • access: public
void setXhtmlOutput ([boolean $xhtml = true])
  • boolean $xhtml: true if you want xhtml, false if you want html

Redefinition of:
jResponseBasicHtml::setXhtmlOutput()
change the type of html for the output

Inherited Methods

Inherited From jResponseBasicHtml

jResponseBasicHtml::__construct()
jResponseBasicHtml::addContent()
jResponseBasicHtml::addHeadContent()
jResponseBasicHtml::doAfterActions()
jResponseBasicHtml::getPlugin()
jResponseBasicHtml::isXhtml()
jResponseBasicHtml::output()
jResponseBasicHtml::outputErrors()
jResponseBasicHtml::setContentType()
jResponseBasicHtml::setXhtmlOutput()

Inherited From jResponse

jResponse::__construct()
jResponse::addHttpHeader()
jResponse::cleanCacheHeaders()
jResponse::clearHttpHeaders()
jResponse::getFormatType()
jResponse::getType()
jResponse::isValidCache()
jResponse::output()
jResponse::outputErrors()
jResponse::sendHttpHeaders()
jResponse::setExpires()
jResponse::setHttpStatus()
jResponse::setLifetime()
jResponse::_checkRequestType()
jResponse::_normalizeDate()

Documentation generated on Wed, 04 Jan 2017 22:56:16 +0100 by phpDocumentor 1.4.3