Class jResponseBasicHtml

Description

Basic HTML response. the HTML content should be provided by a simple php file.

Located in /core/response/jResponseBasicHtml.class.php (line 52)

jResponse
   |
   --jResponseBasicHtml
Direct descendents
Class Description
jResponseHtml HTML response
Variable Summary
string $htmlFile
array $plugins
array $_bodyBottom
array $_bodyTop
string $_charset
mixed $_headBottom
mixed $_isXhtml
string $_lang
string $_type
Method Summary
jResponseBasicHtml __construct ()
void addContent (string $content, [boolean $before = false])
void addHeadContent (string $content)
void doAfterActions ()
jIHTMLResponsePlugin|null getPlugin (string $name)
boolean isXhtml ()
boolean output ()
void outputErrors ()
void setContentType ()
void setXhtmlOutput ([boolean $xhtml = true])
Variables
string $htmlFile = '' (line 105)

full path of php file to output. it should content php instruction

to display these variables:

  • $HEADBOTTOM: content before th </head> tag
  • $BODYTOP: content just after the <body> tag, at the top of the page
  • $BODYBOTTOM: content just before the </body> tag, at the bottom of the page
  • $BASEPATH: base path of the application, for links of your style sheets etc..

  • access: public
array $plugins = array() (line 112)

list of plugins

  • var: array of jIHTMLResponsePlugin
  • since: 1.3a1
  • access: protected
boolean $xhtmlContentType = false (line 81)

says if xhtml content type should be send or not.

it true, a verification of HTTP_ACCEPT is done.

  • access: public
array $_bodyBottom = array() (line 93)

content for the body

  • access: protected
array $_bodyTop = array() (line 92)

content for the body

  • access: protected
string $_charset (line 63)

the charset of the document

  • access: protected
mixed $_headBottom = array () (line 86)

content for head

  • access: protected
mixed $_isXhtml = true (line 74)

says if the document is in xhtml or html

  • access: protected
string $_lang (line 69)

the lang of the document

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

jresponse id

  • access: protected

Redefinition of:
jResponse::$_type

Redefined in descendants as:

Inherited Variables

Inherited from jResponse

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

constructor;

setup the charset, the lang

jResponseBasicHtml __construct ()

Redefinition of:
jResponse::__construct()
constructor

Redefined in descendants as:
addContent (line 167)

add content to the body

you can add additionnal content, before or after the content of body

void addContent (string $content, [boolean $before = false])
  • string $content: additionnal html content
  • boolean $before: true if you want to add it before the content, else false for after
addHeadContent (line 157)

add additional content into the document head

  • since: 1.0b1
  • access: public
void addHeadContent (string $content)
  • string $content
doAfterActions (line 236)

The method you can overload in your inherited html response

overload it if you want to add processes (stylesheet, head settings, additionnal content etc..) after any actions

  • since: 1.1
  • access: protected
void doAfterActions ()
getPlugin (line 146)

return the corresponding plugin

  • return: the plugin or null if it isn't loaded
  • since: 1.3a1
jIHTMLResponsePlugin|null getPlugin (string $name)
  • string $name: the name of the plugin
isXhtml (line 281)

says if the response will be xhtml or html

  • return: true if it is xhtml
  • access: public
boolean isXhtml ()
output (line 192)

output the html content

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

Redefinition of:
jResponse::output()
Send the response in the correct format. If errors or exceptions appears during this method, outputErrors will be called. So the the content should be generated using the output buffer if errors can be appeared during this generation. Be care of http headers.

Redefined in descendants as:
outputErrors (line 243)

output errors

  • access: public
void outputErrors ()

Redefinition of:
jResponse::outputErrors()
Send a response with a generic error message.
setContentType (line 179)

set the content-type in the http headers

  • access: protected
void setContentType ()
setXhtmlOutput (line 273)

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

Redefined in descendants as:

Inherited Methods

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 Mon, 26 Oct 2015 21:55:29 +0100 by phpDocumentor 1.4.3