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::$_acceptSeveralErrors
jResponse::$_httpHeaders
jResponse::$_httpHeadersSent
jResponse::$_httpStatusCode
jResponse::$_httpStatusMsg
Methods
addContent (line 64)

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

Send the bufferized content to the standard output

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

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.
outputErrors (line 105)

output errors

  • access: public
void outputErrors ()

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

No Http Header here

  • access: protected
void sendHttpHeaders ()

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

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::acceptSeveralErrors()
jResponse::addHttpHeader()
jResponse::clearHttpHeaders()
jResponse::getFormatType()
jResponse::getType()
jResponse::hasErrors()
jResponse::output()
jResponse::outputErrors()
jResponse::sendHttpHeaders()
jResponse::setHttpStatus()
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 Thu, 19 Sep 2013 00:06:34 +0200 by phpDocumentor 1.4.3