Class jResponse

Description

base class for response object A response object is responsible to generate a content in a specific format.

  • abstract:

Located in /core/jResponse.class.php (line 19)


	
			
Direct descendents
Class Description
jResponseJson Json response
jResponseZip generate a zip content and send it to the browser
jResponseText plain Text response
jResponseCmdline Command line response
jResponseXMLFeed Responses for Syndication should inherits from jResponseXMLFeed
jResponseXul Generate a XUL window
jResponseRedirectUrl Response To redirect to an URL
jResponseCss Send CSS content
jResponseRedirect Response To redirect to an action
jResponseSoap Response for soap web services
jResponseXmlRpc xmlrpc response
jResponseHtmlFragment Send Html part
jResponseBinary Response use to send a binary file to the browser
jResponseTcpdf PDF Response based on TCPDF (http://tcpdf.sourceforge.net)
jResponseXml XML response generator
jResponseJsonRpc Response for jsonrpc protocol
jResponseLatexToPdf pdf response, generated from a latex content
jResponseHtml HTML response
jResponseRdf output RDF content.
Variable Summary
Method Summary
jResponse __construct ()
boolean acceptSeveralErrors ()
void addHttpHeader (string $htype, string $hcontent, [boolean $overwrite = true])
string getFormatType ()
string getType ()
void hasErrors ()
boolean output ()
void outputErrors ()
void sendHttpHeaders ()
void setHttpStatus (string $code, string $msg)
Variables
mixed $_errorMessages = array() (line 26)
  • access: protected
mixed $_httpHeaders = array() (line 30)
  • access: protected
mixed $_httpHeadersSent = false (line 32)
  • access: protected
mixed $_httpStatusCode = '200' (line 34)
  • access: protected
mixed $_httpStatusMsg = 'OK' (line 36)
  • access: protected
Methods
Constructor __construct (line 41)

constructor

jResponse __construct ()

Redefined in descendants as:
acceptSeveralErrors (line 75)

says if the response can embed more than one error message

  • return: true if many
  • access: public
boolean acceptSeveralErrors ()
addHttpHeader (line 89)

add an http header to the response.

will be send during the output of the response

  • access: public
void addHttpHeader (string $htype, string $hcontent, [boolean $overwrite = true])
  • string $htype: the header type ("Content-Type", "Date-modified"...)
  • string $hcontent: value of the header type
  • boolean $overwrite: false if the value should be set only if it doesn't still exist
clearHttpHeaders (line 98)

delete all http headers

  • access: public
void clearHttpHeaders ()
getFormatType (line 69)

return the format type name (eg the family type name)

  • return: the name
  • access: public
string getFormatType ()

Redefined in descendants as:
getType (line 63)

return the response type name

  • return: the name
  • access: public
string getType ()
hasErrors (line 80)
  • access: public
void hasErrors ()
output (line 50)

Send the response in the correct format.

  • return: true if the output is ok
  • abstract:
  • access: public
boolean output ()

Redefined in descendants as:
sendHttpHeaders (line 114)

send http headers

  • access: protected
void sendHttpHeaders ()

Redefined in descendants as:
setHttpStatus (line 109)

set the http status code for the http header

  • access: public
void setHttpStatus (string $code, string $msg)
  • string $code: the status code (200, 404...)
  • string $msg: the message following the status code ("OK", "Not Found"..)

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