ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class ilFileDelivery. More...
Public Member Functions | |
__construct ($path_to_file) | |
stream () | |
deliver () | |
deliverVirtual () | |
not supported More... | |
setGeneralHeaders () | |
setCachingHeaders () | |
generateEtag () | |
close () | |
getDeliveryType () | |
setDeliveryType ($delivery_type) | |
getMimeType () | |
setMimeType ($mime_type) | |
getPathToFile () | |
setPathToFile ($path_to_file) | |
getDownloadFileName () | |
setDownloadFileName ($download_file_name) | |
getDisposition () | |
setDisposition ($disposition) | |
isSendMimeType () | |
setSendMimeType ($send_mime_type) | |
isExitAfter () | |
setExitAfter ($exit_after) | |
isConvertFileNameToAsci () | |
setConvertFileNameToAsci ($convert_file_name_to_asci) | |
getEtag () | |
setEtag ($etag) | |
getShowLastModified () | |
setShowLastModified ($show_last_modified) | |
isHasContext () | |
setHasContext ($has_context) | |
hasCache () | |
setCache ($cache) | |
hasHashFilename () | |
setHashFilename ($hash_filename) | |
checkCache () | |
clearBuffer () | |
isDeleteFile () | |
setDeleteFile ($delete_file) | |
isUrlencodeFilename () | |
setUrlencodeFilename ($urlencode_filename) | |
Static Public Member Functions | |
static | deliverFileAttached ($path_to_file, $download_file_name=null, $mime_type=null, $delete_file=false) |
static | streamVideoInline ($path_to_file, $download_file_name=null) |
static | deliverFileInline ($path_to_file, $download_file_name=null) |
static | isDEBUG () |
static | setDEBUG ($DEBUG) |
static | returnASCIIFileName ($original_name) |
Data Fields | |
const | DIRECT_PHP_OUTPUT = 'php://output' |
const | DELIVERY_METHOD_NONE = 'cache' |
const | DELIVERY_METHOD_XSENDFILE = 'mod_xsendfile' |
const | DELIVERY_METHOD_XACCEL = 'x-accel-redirect' |
const | DELIVERY_METHOD_PHP = 'php' |
const | DELIVERY_METHOD_PHP_CHUNKED = 'php_chunked' |
const | DELIVERY_METHOD_VIRTUAL = 'virtual' |
const | DISP_ATTACHMENT = 'attachment' |
const | DISP_INLINE = 'inline' |
const | VIRTUAL_DATA = 'virtual-data' |
const | SECURED_DATA = 'secured-data' |
const | DATA = 'data' |
Protected Member Functions | |
deliverXSendfile () | |
deliverXAccelRedirect () | |
deliverPHP () | |
clearHeaders () | |
determineMimeType () | |
determineDownloadFileName () | |
detemineDeliveryType () | |
deliverPHPChunked () | |
sendEtagHeader () | |
sendLastModified () | |
isNonModified () | |
checkExisting () | |
sendFileUnbufferedUsingHeaders (\Closure $closure) | |
Protected Attributes | |
$delivery_type = self::DELIVERY_METHOD_PHP | |
$mime_type = '' | |
$path_to_file = '' | |
$download_file_name = '' | |
$disposition = self::DISP_ATTACHMENT | |
$send_mime_type = true | |
$exit_after = true | |
$convert_file_name_to_asci = true | |
$etag = '' | |
$show_last_modified = true | |
$has_context = true | |
$cache = false | |
$hash_filename = false | |
$delete_file = false | |
$urlencode_filename = false | |
Static Protected Attributes | |
static | $self_streaming_methods |
static | $delivery_type_static = null |
static | $DEBUG = false |
ilFileDelivery::__construct | ( | $path_to_file | ) |
$path_to_file |
Definition at line 158 of file class.ilFileDelivery.php.
References $path_to_file, detemineDeliveryType(), determineDownloadFileName(), determineMimeType(), ilContext\getType(), setHasContext(), and setPathToFile().
ilFileDelivery::checkCache | ( | ) |
Definition at line 760 of file class.ilFileDelivery.php.
References generateEtag(), hasCache(), isNonModified(), sendEtagHeader(), setCachingHeaders(), and setShowLastModified().
Referenced by deliver(), and ilPHPOutputDelivery\start().
|
protected |
Definition at line 784 of file class.ilFileDelivery.php.
References $DIC, $download_file_name, close(), getDownloadFileName(), getPathToFile(), isConvertFileNameToAsci(), isUrlencodeFilename(), ilIniFile\readVariable(), setConvertFileNameToAsci(), setDownloadFileName(), setUrlencodeFilename(), and ilHTTP\status().
Referenced by setGeneralHeaders().
ilFileDelivery::clearBuffer | ( | ) |
Definition at line 774 of file class.ilFileDelivery.php.
References ilWACLog\getInstance().
Referenced by deliver(), and ilPHPOutputDelivery\start().
|
protected |
Definition at line 273 of file class.ilFileDelivery.php.
Referenced by deliverVirtual(), and deliverXAccelRedirect().
ilFileDelivery::close | ( | ) |
Definition at line 318 of file class.ilFileDelivery.php.
References exit.
Referenced by checkExisting(), deliver(), deliverPHPChunked(), and ilPHPOutputDelivery\stop().
ilFileDelivery::deliver | ( | ) |
Definition at line 181 of file class.ilFileDelivery.php.
References checkCache(), clearBuffer(), close(), deliverPHP(), deliverPHPChunked(), deliverVirtual(), deliverXAccelRedirect(), deliverXSendfile(), getDeliveryType(), getPathToFile(), isDeleteFile(), isExitAfter(), and setGeneralHeaders().
Referenced by stream().
|
static |
$path_to_file | ||
null | $download_file_name | |
null | $mime_type | |
bool | $delete_file |
Definition at line 112 of file class.ilFileDelivery.php.
References $delete_file, $download_file_name, $mime_type, and $path_to_file.
Referenced by ilSystemStyleSkinContainer\export(), and ilObjBibliographicGUI\sendFile().
|
static |
$path_to_file | ||
null | $download_file_name |
Definition at line 144 of file class.ilFileDelivery.php.
References $download_file_name, and $path_to_file.
|
protected |
Definition at line 265 of file class.ilFileDelivery.php.
References $file, and getPathToFile().
Referenced by deliver().
|
protected |
Definition at line 610 of file class.ilFileDelivery.php.
References $_SERVER, $file, $size, $start, close(), getPathToFile(), header, and ilHTTP\status().
Referenced by deliver().
ilFileDelivery::deliverVirtual | ( | ) |
not supported
Definition at line 217 of file class.ilFileDelivery.php.
References $path_to_file, clearHeaders(), getPathToFile(), and header.
Referenced by deliver().
|
protected |
Definition at line 244 of file class.ilFileDelivery.php.
References $path_to_file, clearHeaders(), getPathToFile(), header, isDeleteFile(), and sendFileUnbufferedUsingHeaders().
Referenced by deliver().
|
protected |
Definition at line 231 of file class.ilFileDelivery.php.
References getPathToFile(), header, isDeleteFile(), and sendFileUnbufferedUsingHeaders().
Referenced by deliver().
|
protected |
Definition at line 360 of file class.ilFileDelivery.php.
References getDeliveryType(), ilRuntime\getInstance(), ilWACLog\getInstance(), getPathToFile(), and setDeliveryType().
Referenced by __construct().
|
protected |
Definition at line 349 of file class.ilFileDelivery.php.
References $download_file_name, getDownloadFileName(), getPathToFile(), and setDownloadFileName().
Referenced by __construct().
|
protected |
Definition at line 326 of file class.ilFileDelivery.php.
References $info, ilMimeTypeUtil\APPLICATION__OCTET_STREAM, getPathToFile(), ilMimeTypeUtil\lookupMimeType(), and setMimeType().
Referenced by __construct().
ilFileDelivery::generateEtag | ( | ) |
Definition at line 313 of file class.ilFileDelivery.php.
References getPathToFile(), and setEtag().
Referenced by checkCache().
ilFileDelivery::getDeliveryType | ( | ) |
Definition at line 405 of file class.ilFileDelivery.php.
References $delivery_type.
Referenced by deliver(), detemineDeliveryType(), setGeneralHeaders(), and stream().
ilFileDelivery::getDisposition | ( | ) |
Definition at line 469 of file class.ilFileDelivery.php.
References $disposition.
Referenced by setGeneralHeaders().
ilFileDelivery::getDownloadFileName | ( | ) |
Definition at line 453 of file class.ilFileDelivery.php.
References $download_file_name.
Referenced by checkExisting(), determineDownloadFileName(), and setGeneralHeaders().
ilFileDelivery::getEtag | ( | ) |
Definition at line 533 of file class.ilFileDelivery.php.
References $etag.
Referenced by isNonModified(), and sendEtagHeader().
ilFileDelivery::getMimeType | ( | ) |
Definition at line 421 of file class.ilFileDelivery.php.
References $mime_type.
Referenced by setGeneralHeaders().
ilFileDelivery::getPathToFile | ( | ) |
Definition at line 437 of file class.ilFileDelivery.php.
References $path_to_file.
Referenced by checkExisting(), deliver(), deliverPHP(), deliverPHPChunked(), deliverVirtual(), deliverXAccelRedirect(), deliverXSendfile(), detemineDeliveryType(), determineDownloadFileName(), determineMimeType(), generateEtag(), isNonModified(), sendLastModified(), and setGeneralHeaders().
ilFileDelivery::getShowLastModified | ( | ) |
Definition at line 549 of file class.ilFileDelivery.php.
References $show_last_modified.
Referenced by sendLastModified().
ilFileDelivery::hasCache | ( | ) |
Definition at line 581 of file class.ilFileDelivery.php.
References $cache.
Referenced by checkCache().
ilFileDelivery::hasHashFilename | ( | ) |
Definition at line 597 of file class.ilFileDelivery.php.
References $hash_filename.
Referenced by setGeneralHeaders().
ilFileDelivery::isConvertFileNameToAsci | ( | ) |
Definition at line 517 of file class.ilFileDelivery.php.
References $convert_file_name_to_asci.
Referenced by checkExisting(), and setGeneralHeaders().
|
static |
Definition at line 747 of file class.ilFileDelivery.php.
ilFileDelivery::isDeleteFile | ( | ) |
Definition at line 832 of file class.ilFileDelivery.php.
References $delete_file.
Referenced by deliver(), deliverXAccelRedirect(), and deliverXSendfile().
ilFileDelivery::isExitAfter | ( | ) |
Definition at line 501 of file class.ilFileDelivery.php.
References $exit_after.
Referenced by deliver().
ilFileDelivery::isHasContext | ( | ) |
|
protected |
Definition at line 721 of file class.ilFileDelivery.php.
References $_SERVER, getEtag(), and getPathToFile().
Referenced by checkCache().
ilFileDelivery::isSendMimeType | ( | ) |
Definition at line 485 of file class.ilFileDelivery.php.
References $send_mime_type.
Referenced by setGeneralHeaders().
ilFileDelivery::isUrlencodeFilename | ( | ) |
Definition at line 848 of file class.ilFileDelivery.php.
References $urlencode_filename.
Referenced by checkExisting().
|
static |
$original_name |
Definition at line 823 of file class.ilFileDelivery.php.
References ilUtil\getASCIIFilename().
|
protected |
Definition at line 703 of file class.ilFileDelivery.php.
References getEtag(), and header.
Referenced by checkCache(), and setCachingHeaders().
|
protected |
\Closure | $closure | which sets the output-headers, e.g. header('X-Sendfile: ' . realpath($this->getPathToFile())); |
Definition at line 865 of file class.ilFileDelivery.php.
Referenced by deliverXAccelRedirect(), and deliverXSendfile().
|
protected |
Definition at line 710 of file class.ilFileDelivery.php.
References date, getPathToFile(), getShowLastModified(), and header.
Referenced by setCachingHeaders().
ilFileDelivery::setCache | ( | $cache | ) |
boolean | $cache |
Definition at line 589 of file class.ilFileDelivery.php.
References $cache.
Referenced by ilWebAccessCheckerDelivery\deliver().
ilFileDelivery::setCachingHeaders | ( | ) |
Definition at line 305 of file class.ilFileDelivery.php.
References header, sendEtagHeader(), and sendLastModified().
Referenced by checkCache(), and ilPHPOutputDelivery\start().
ilFileDelivery::setConvertFileNameToAsci | ( | $convert_file_name_to_asci | ) |
boolean | $convert_file_name_to_asci |
Definition at line 525 of file class.ilFileDelivery.php.
References $convert_file_name_to_asci.
Referenced by checkExisting().
|
static |
boolean | $DEBUG |
Definition at line 755 of file class.ilFileDelivery.php.
References $DEBUG.
ilFileDelivery::setDeleteFile | ( | $delete_file | ) |
boolean | $delete_file |
Definition at line 840 of file class.ilFileDelivery.php.
References $delete_file.
ilFileDelivery::setDeliveryType | ( | $delivery_type | ) |
string | $delivery_type |
Definition at line 413 of file class.ilFileDelivery.php.
References $delivery_type.
Referenced by detemineDeliveryType(), and stream().
ilFileDelivery::setDisposition | ( | $disposition | ) |
string | $disposition |
Definition at line 477 of file class.ilFileDelivery.php.
References $disposition.
Referenced by ilWebAccessCheckerDelivery\deliverDummyImage(), ilWebAccessCheckerDelivery\deliverDummyVideo(), and ilPHPOutputDelivery\start().
ilFileDelivery::setDownloadFileName | ( | $download_file_name | ) |
string | $download_file_name |
Definition at line 461 of file class.ilFileDelivery.php.
References $download_file_name.
Referenced by checkExisting(), determineDownloadFileName(), and ilPHPOutputDelivery\start().
ilFileDelivery::setEtag | ( | $etag | ) |
string | $etag |
Definition at line 541 of file class.ilFileDelivery.php.
References $etag.
Referenced by generateEtag().
ilFileDelivery::setExitAfter | ( | $exit_after | ) |
boolean | $exit_after |
Definition at line 509 of file class.ilFileDelivery.php.
References $exit_after.
ilFileDelivery::setGeneralHeaders | ( | ) |
Definition at line 278 of file class.ilFileDelivery.php.
References $download_file_name, checkExisting(), getDeliveryType(), getDisposition(), getDownloadFileName(), getMimeType(), getPathToFile(), hasHashFilename(), header, isConvertFileNameToAsci(), and isSendMimeType().
Referenced by deliver(), and ilPHPOutputDelivery\start().
ilFileDelivery::setHasContext | ( | $has_context | ) |
boolean | $has_context |
Definition at line 573 of file class.ilFileDelivery.php.
References $has_context.
Referenced by __construct().
ilFileDelivery::setHashFilename | ( | $hash_filename | ) |
boolean | $hash_filename |
Definition at line 605 of file class.ilFileDelivery.php.
References $hash_filename.
ilFileDelivery::setMimeType | ( | $mime_type | ) |
string | $mime_type |
Definition at line 429 of file class.ilFileDelivery.php.
References $mime_type.
Referenced by determineMimeType(), and ilPHPOutputDelivery\start().
ilFileDelivery::setPathToFile | ( | $path_to_file | ) |
string | $path_to_file |
Definition at line 445 of file class.ilFileDelivery.php.
References $path_to_file.
Referenced by __construct().
ilFileDelivery::setSendMimeType | ( | $send_mime_type | ) |
boolean | $send_mime_type |
Definition at line 493 of file class.ilFileDelivery.php.
References $send_mime_type.
ilFileDelivery::setShowLastModified | ( | $show_last_modified | ) |
boolean | $show_last_modified |
Definition at line 557 of file class.ilFileDelivery.php.
References $show_last_modified.
Referenced by checkCache(), and ilPHPOutputDelivery\start().
ilFileDelivery::setUrlencodeFilename | ( | $urlencode_filename | ) |
bool | $urlencode_filename |
Definition at line 856 of file class.ilFileDelivery.php.
References $urlencode_filename.
Referenced by checkExisting().
ilFileDelivery::stream | ( | ) |
Definition at line 173 of file class.ilFileDelivery.php.
References deliver(), getDeliveryType(), and setDeliveryType().
|
static |
$path_to_file | ||
null | $download_file_name |
Definition at line 130 of file class.ilFileDelivery.php.
References $download_file_name, and $path_to_file.
|
protected |
Definition at line 87 of file class.ilFileDelivery.php.
Referenced by hasCache(), and setCache().
|
protected |
Definition at line 71 of file class.ilFileDelivery.php.
Referenced by isConvertFileNameToAsci(), and setConvertFileNameToAsci().
|
staticprotected |
Definition at line 103 of file class.ilFileDelivery.php.
Referenced by setDEBUG().
|
protected |
Definition at line 95 of file class.ilFileDelivery.php.
Referenced by deliverFileAttached(), isDeleteFile(), and setDeleteFile().
|
protected |
Definition at line 43 of file class.ilFileDelivery.php.
Referenced by getDeliveryType(), and setDeliveryType().
|
staticprotected |
Definition at line 39 of file class.ilFileDelivery.php.
|
protected |
Definition at line 59 of file class.ilFileDelivery.php.
Referenced by getDisposition(), and setDisposition().
|
protected |
Definition at line 55 of file class.ilFileDelivery.php.
Referenced by checkExisting(), deliverFileAttached(), deliverFileInline(), determineDownloadFileName(), getDownloadFileName(), setDownloadFileName(), setGeneralHeaders(), and streamVideoInline().
|
protected |
Definition at line 75 of file class.ilFileDelivery.php.
|
protected |
Definition at line 67 of file class.ilFileDelivery.php.
Referenced by isExitAfter(), and setExitAfter().
|
protected |
Definition at line 83 of file class.ilFileDelivery.php.
Referenced by isHasContext(), and setHasContext().
|
protected |
Definition at line 91 of file class.ilFileDelivery.php.
Referenced by hasHashFilename(), and setHashFilename().
|
protected |
Definition at line 47 of file class.ilFileDelivery.php.
Referenced by deliverFileAttached(), getMimeType(), and setMimeType().
|
protected |
Definition at line 51 of file class.ilFileDelivery.php.
Referenced by __construct(), deliverFileAttached(), deliverFileInline(), deliverVirtual(), deliverXAccelRedirect(), getPathToFile(), setPathToFile(), and streamVideoInline().
|
staticprotected |
Definition at line 32 of file class.ilFileDelivery.php.
|
protected |
Definition at line 63 of file class.ilFileDelivery.php.
Referenced by isSendMimeType(), and setSendMimeType().
|
protected |
Definition at line 79 of file class.ilFileDelivery.php.
Referenced by getShowLastModified(), and setShowLastModified().
|
protected |
Definition at line 99 of file class.ilFileDelivery.php.
Referenced by isUrlencodeFilename(), and setUrlencodeFilename().
const ilFileDelivery::DATA = 'data' |
Definition at line 28 of file class.ilFileDelivery.php.
const ilFileDelivery::DELIVERY_METHOD_NONE = 'cache' |
Definition at line 18 of file class.ilFileDelivery.php.
const ilFileDelivery::DELIVERY_METHOD_PHP = 'php' |
Definition at line 21 of file class.ilFileDelivery.php.
const ilFileDelivery::DELIVERY_METHOD_PHP_CHUNKED = 'php_chunked' |
Definition at line 22 of file class.ilFileDelivery.php.
const ilFileDelivery::DELIVERY_METHOD_VIRTUAL = 'virtual' |
Definition at line 23 of file class.ilFileDelivery.php.
const ilFileDelivery::DELIVERY_METHOD_XACCEL = 'x-accel-redirect' |
Definition at line 20 of file class.ilFileDelivery.php.
const ilFileDelivery::DELIVERY_METHOD_XSENDFILE = 'mod_xsendfile' |
Definition at line 19 of file class.ilFileDelivery.php.
const ilFileDelivery::DIRECT_PHP_OUTPUT = 'php://output' |
Definition at line 17 of file class.ilFileDelivery.php.
Referenced by ilExcel\sendToClient(), and ilPHPOutputDelivery\start().
const ilFileDelivery::DISP_ATTACHMENT = 'attachment' |
Definition at line 24 of file class.ilFileDelivery.php.
Referenced by ilObjFile\determineFileSize(), and ilPHPOutputDelivery\start().
const ilFileDelivery::DISP_INLINE = 'inline' |
Definition at line 25 of file class.ilFileDelivery.php.
Referenced by ilObjFile\determineFileSize().
const ilFileDelivery::SECURED_DATA = 'secured-data' |
Definition at line 27 of file class.ilFileDelivery.php.
const ilFileDelivery::VIRTUAL_DATA = 'virtual-data' |
Definition at line 26 of file class.ilFileDelivery.php.