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
jResponse::$_outputOnlyHeaders
Methods
Constructor __construct (line 52)

constructor;

setup the template engine

jResponseHtmlFragment __construct ()

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

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

The method you can overload in your inherited htmlfragment response

after all actions

  • since: 1.1
  • access: protected
void doAfterActions ()
getFormatType (line 127)
  • 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 110)

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::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:37 +0100 by phpDocumentor 1.4.3