Class jResponseXml

Description

XML response generator

Located in /core/response/jResponseXml.class.php (line 25)

jResponse
   |
   --jResponseXml
Variable Summary
boolean $checkValidity
string $contentTpl
boolean $sendXMLHeader
string $_charset
string $_type
Method Summary
jResponseXml __construct ()
void addCSSStyleSheet ( $src, [ $params = array()])
void addXSLStyleSheet ( $src, [ $params = array()])
boolean output ()
void outputErrors ()
void outputXmlHeader ()
Variables
boolean $checkValidity = false (line 48)

if true, verify validity of the xml content, before to output it

  • access: public
jTpl $content = null (line 36)

the template container

  • access: public
string $contentTpl = '' (line 42)

selector of the template file

  • access: public
boolean $sendXMLHeader = TRUE (line 65)

say if the XML header have to be generated

Usefull if the XML string to output already contain the XML header

  • since: 1.0.3
  • access: public
string $_charset (line 54)

The charset

  • access: protected
string $_type = 'xml' (line 30)

Id of the response

  • 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 70)

constructor..

jResponseXml __construct ()

Redefinition of:
jResponse::__construct()
constructor
addCSSStyleSheet (line 125)

to add a link to css stylesheet

  • since: 1.0b1
  • access: public
void addCSSStyleSheet ( $src, [ $params = array()])
  • $src
  • $params
addXSLStyleSheet (line 135)

to add a link to an xsl stylesheet

  • since: 1.0b1
  • access: public
void addXSLStyleSheet ( $src, [ $params = array()])
  • $src
  • $params
output (line 81)

generate the xml content and send it to the browser

  • return: true if 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 114)

output errors if any

  • access: public
void outputErrors ()

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

output all processing instructions (stylesheet, xsl..) before the XML content

  • access: protected
void outputXmlHeader ()

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 Wed, 24 Sep 2014 22:01:45 +0200 by phpDocumentor 1.4.3