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
jResponse::$_outputOnlyHeaders
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 105)

set all headers to force download

  • access: protected
void _downloadHeader ()

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

Documentation generated on Wed, 04 Jan 2017 22:56:11 +0100 by phpDocumentor 1.4.3