Class jResponseBinary

Description

Response use to send a binary file to the browser

Located in /core/response/jResponseBinary.class.php (line 21)

jResponse
   |
   --jResponseBinary
Variable Summary
string $content
boolean $doDownload
string $fileName
string $mimeType
string $_type
Method Summary
boolean output ()
void _downloadHeader ()
Variables
string $content = null (line 42)

the content you want to send. Keep empty if you indicate a filename

  • access: public
boolean $doDownload = true (line 49)

Says if the "save as" dialog appear or not to the user.

if false, specify the mime type in $mimetype

  • access: public
string $fileName = '' (line 31)

The path of the file you want to send. Keep empty if you provide the content

  • access: public
string $mimeType = 'application/octet-stream' (line 56)

The mimeType of the current binary file.

It will be sent in the header "Content-Type".

  • access: public
string $outputFileName = '' (line 36)

name of the file under which the content will be send to the user

  • access: public
string $_type = 'binary' (line 25)
  • access: protected

Redefinition of:
jResponse::$_type

Inherited Variables

Inherited from jResponse

jResponse::$forcedHttpVersion
jResponse::$httpVersion
jResponse::$_httpHeaders
jResponse::$_httpHeadersSent
jResponse::$_httpStatusCode
jResponse::$_httpStatusMsg
Methods
output (line 62)

send the content or the file to the browser.

  • return: true it it's 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.
_downloadHeader (line 101)

set all headers to force download

  • access: protected
void _downloadHeader ()

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 Mon, 19 Sep 2011 14:13:22 +0200 by phpDocumentor 1.4.3