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

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

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

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
Methods
Constructor __construct (line 117)

constructor;

setup the charset, the lang

jResponseBasicHtml __construct ()

Redefinition of:
jResponse::__construct()
constructor

Redefined in descendants as:
addContent (line 166)

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

add additional content into the document head

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

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

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

says if the response will be xhtml or html

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

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

output errors

  • access: public
void outputErrors ()

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

set the content-type in the http headers

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

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

Documentation generated on Mon, 19 Sep 2011 14:13:21 +0200 by phpDocumentor 1.4.3