Class jResponseHtml

Description

HTML response

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

jResponse
   |
   --jResponseBasicHtml
      |
      --jResponseHtml
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
boolean $_strictDoctype
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 setCSSIELinks (array $list)
void setCSSLinks (array $list)
void setJSIELinks (array $list)
void setJSLinks (array $list)
void setXhtmlOutput ([boolean $xhtml = true])
void strictDoctype ([boolean $val = 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
boolean $_strictDoctype = true (line 156)

says if the document uses a Strict or Transitional Doctype

  • since: 1.1.3
  • 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::$_isXhtml
jResponseBasicHtml::$_lang

Inherited from jResponse

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

constructor;

setup the charset, the lang, the template engine

jResponseHtml __construct ()

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

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 338)

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 237)

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 224)

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 369)

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 360)

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 378)

add generator a generator meta tag

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

add some keywords in a keywords meta tag

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

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 535)

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 572)

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

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

returns all CSS links for IE

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

returns all CSS links

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

returns all JS links for IE

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

returns all JS links

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

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 408)
  • access: protected
void outputCssLinkTag ( $fileUrl,  $cssParams)
  • $fileUrl
  • $cssParams
outputDoctype (line 385)

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 ()
outputHtmlHeader (line 424)

generate the content of the <head> content

  • access: protected
void outputHtmlHeader ()
outputJsScriptTag (line 396)
  • access: protected
void outputJsScriptTag ( $fileUrl,  $scriptParams)
  • $fileUrl
  • $scriptParams
setCSSIELinks (line 297)

set all CSS links for IE

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

set all CSS links

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

set all JS links for IE

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

set all JS links

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

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
strictDoctype (line 564)

activate / deactivate the strict Doctype (activated by default)

  • since: 1.1.3
  • access: public
void strictDoctype ([boolean $val = true])
  • boolean $val: true for strict, false for transitional

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::clearHttpHeaders()
jResponse::getFormatType()
jResponse::getType()
jResponse::output()
jResponse::outputErrors()
jResponse::sendHttpHeaders()
jResponse::setHttpStatus()

Documentation generated on Wed, 24 Sep 2014 22:01:26 +0200 by phpDocumentor 1.4.3