Class jResponseHtmlFragment

Description

Send Html part

Located in /core/response/jResponseHtmlFragment.class.php (line 19)

jResponse
   |
   --jResponseHtmlFragment
Variable Summary
string $tplname
array $_contentTop
string $_type
Method Summary
jResponseHtmlFragment __construct ()
void addContent (string $content, [boolean $beforeTpl = false])
void doAfterActions ()
void getFormatType ()
boolean output ()
void outputErrors ()
Variables
jTpl $tpl = null (line 38)

the jtpl object created automatically

  • access: public
string $tplname = '' (line 32)

template selector

set the template name in this property

  • access: public
array $_contentBottom = array() (line 45)

content surrounding template content

  • access: protected
array $_contentTop = array() (line 44)

content surrounding template content

  • access: protected
string $_type = 'htmlfragment' (line 25)

jresponse id

  • access: protected

Redefinition of:
jResponse::$_type

Inherited Variables

Inherited from jResponse

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

constructor;

setup the template engine

jResponseHtmlFragment __construct ()

Redefinition of:
jResponse::__construct()
constructor
addContent (line 87)

add content to the response

you can add additionnal content, before or after the content generated by the main template

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

The method you can overload in your inherited htmlfragment response

after all actions

  • since: 1.1
  • access: protected
void doAfterActions ()
getFormatType (line 125)
  • access: public
void getFormatType ()

Redefinition of:
jResponse::getFormatType()
return the format type name (eg the family type name)
output (line 61)

send the Html part

  • return: true if it's 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.
outputErrors (line 107)

output errors

  • access: public
void outputErrors ()

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

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:24 +0200 by phpDocumentor 1.4.3