Class jResponseCmdline

Description

Command line response

Located in /core/response/jResponseCmdline.class.php (line 17)

jResponse
   |
   --jResponseCmdline
Class Constant Summary
Variable Summary
string $_buffer
string $_type
Method Summary
void addContent (string $content, [bool $bufferize = false])
void flushContent ()
int getExitCode ()
boolean output ()
void outputErrors ()
void sendHttpHeaders ()
void setExitCode (mixed $code)
Variables
string $_buffer = '' (line 36)
  • access: protected
int $_exit_code = self::EXIT_CODE_OK (line 41)
  • access: protected
string $_type = 'cmdline' (line 31)
  • 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
addContent (line 61)

Send the specified content to the standard output.

The content can be bufferized and displayed only when you call flushContent or do a non-bufferized addContent

  • access: public
void addContent (string $content, [bool $bufferize = false])
  • string $content
  • bool $bufferize
flushContent (line 75)

Send the bufferized content to the standard output

  • access: public
void flushContent ()
getExitCode (line 85)

Get the exit code of the command line response

  • access: public
int getExitCode ()
output (line 47)

output the content with the text/plain mime type

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

output errors

  • access: public
void outputErrors ()

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

No Http Header here

  • access: protected
void sendHttpHeaders ()

Redefinition of:
jResponse::sendHttpHeaders()
send http headers
setExitCode (line 95)

Set the exit code of the command line

  • access: public
void setExitCode (mixed $code)
  • mixed $code: The code that will be passed to the exit() function

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()
Class Constants
EXIT_CODE_ERROR = 1 (line 26)

Code used by exit function in the end of the process if an error occured

EXIT_CODE_OK = 0 (line 21)

Code used by exit function in the end of the process if no error occured

Documentation generated on Mon, 26 Oct 2015 21:55:31 +0100 by phpDocumentor 1.4.3