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 ()
void _commonProcess ()
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
ident of the response type

Inherited Variables

Inherited from jResponse

jResponse::$_acceptSeveralErrors
jResponse::$_errorMessages
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 91)

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

The method you can overload in your inherited htmlfragment response

after all actions

  • since: 1.1
  • access: protected
void doAfterActions ()
getFormatedErrorMsg (line 143)

create html error messages

  • return: html content
  • access: protected
string getFormatedErrorMsg ()
getFormatType (line 153)
  • 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.
outputErrors (line 120)

output errors

  • access: public
void outputErrors ()

Redefinition of:
jResponse::outputErrors()
Send a response with only error messages which appears during the action
_commonProcess (line 114)

same use as doAfterActions, but deprecated method. It is just here for compatibility with Jelix 1.0.

Use doAfterActions instead

  • deprecated:
  • access: protected
void _commonProcess ()

Inherited Methods

Inherited From jResponse

jResponse::__construct()
jResponse::acceptSeveralErrors()
jResponse::addHttpHeader()
jResponse::clearHttpHeaders()
jResponse::getFormatType()
jResponse::getType()
jResponse::hasErrors()
jResponse::output()
jResponse::outputErrors()
jResponse::sendHttpHeaders()
jResponse::setHttpStatus()

Documentation generated on Thu, 22 Mar 2012 22:16:43 +0100 by phpDocumentor 1.4.3