ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($path_to_file, GlobalHttpState $httpState) | |
stream () | |
deliver () | |
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) | |
Static Public Member Functions | |
static | isDEBUG () |
static | setDEBUG ($DEBUG) |
static | returnASCIIFileName ($original_filename) |
Converts a UTF-8 filename to ASCII. More... | |
Data Fields | |
const | DIRECT_PHP_OUTPUT = 'php://output' |
const | DISP_ATTACHMENT = 'attachment' |
const | DISP_INLINE = 'inline' |
Private Member Functions | |
delivery () | |
determineMimeType () | |
determineDownloadFileName () | |
detemineDeliveryType () | |
sendEtagHeader () | |
sendLastModified () | |
checkExisting () | |
cleanDownloadFileName () | |
Converts the filename to ASCII. More... | |
setDispositionHeaders () | |
Private Attributes | |
$delivery_type = DeliveryMethod::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 | |
$httpService | |
$fileDeliveryTypeFactory | |
Static Private Attributes | |
static | $delivery_type_static = null |
static | $DEBUG = false |
ILIAS\FileDelivery\Delivery::__construct | ( | $path_to_file, | |
GlobalHttpState | $httpState | ||
) |
string | $path_to_file | |
GlobalHttpState | $httpState |
Definition at line 110 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$path_to_file, ILIAS\FileDelivery\Delivery\detemineDeliveryType(), ILIAS\FileDelivery\Delivery\determineDownloadFileName(), ILIAS\FileDelivery\Delivery\determineMimeType(), ilContext\getType(), ILIAS\FileDelivery\Delivery\setHasContext(), and ILIAS\FileDelivery\Delivery\setPathToFile().
ILIAS\FileDelivery\Delivery::checkCache | ( | ) |
Definition at line 600 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\generateEtag(), ILIAS\FileDelivery\Delivery\hasCache(), ILIAS\FileDelivery\Delivery\sendEtagHeader(), ILIAS\FileDelivery\Delivery\setCachingHeaders(), and ILIAS\FileDelivery\Delivery\setShowLastModified().
Referenced by ILIAS\FileDelivery\Delivery\deliver().
|
private |
Definition at line 628 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\close(), and ILIAS\FileDelivery\Delivery\getPathToFile().
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
|
private |
Converts the filename to ASCII.
Definition at line 643 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$download_file_name, ILIAS\FileDelivery\Delivery\getDownloadFileName(), and ILIAS\FileDelivery\Delivery\setDownloadFileName().
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::clearBuffer | ( | ) |
Definition at line 614 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\deliver().
ILIAS\FileDelivery\Delivery::close | ( | ) |
Definition at line 210 of file Delivery.php.
References exit.
Referenced by ILIAS\FileDelivery\Delivery\checkExisting(), and ILIAS\FileDelivery\Delivery\deliver().
ILIAS\FileDelivery\Delivery::deliver | ( | ) |
Definition at line 142 of file Delivery.php.
References $response, ILIAS\FileDelivery\Delivery\checkCache(), ILIAS\FileDelivery\Delivery\clearBuffer(), ILIAS\FileDelivery\Delivery\close(), ILIAS\FileDelivery\Delivery\delivery(), ILIAS\FileDelivery\Delivery\getDeliveryType(), ILIAS\FileDelivery\Delivery\getPathToFile(), ILIAS\FileDelivery\Delivery\isDeleteFile(), ILIAS\FileDelivery\Delivery\isExitAfter(), and ILIAS\FileDelivery\Delivery\setGeneralHeaders().
Referenced by ILIAS\FileDelivery\Delivery\stream().
|
private |
Definition at line 136 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\getDeliveryType().
Referenced by ILIAS\FileDelivery\Delivery\deliver(), and ILIAS\FileDelivery\Delivery\stream().
|
private |
Definition at line 255 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\getDeliveryType(), ilRuntime\getInstance(), ILIAS\FileDelivery\Delivery\getPathToFile(), ILIAS\FileDelivery\FileDeliveryTypes\DeliveryMethod\PHP, ILIAS\FileDelivery\Delivery\setDeliveryType(), ILIAS\FileDelivery\FileDeliveryTypes\DeliveryMethod\XACCEL, and ILIAS\FileDelivery\FileDeliveryTypes\DeliveryMethod\XSENDFILE.
Referenced by ILIAS\FileDelivery\Delivery\__construct().
|
private |
Definition at line 243 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$download_file_name, ILIAS\FileDelivery\Delivery\getDownloadFileName(), ILIAS\FileDelivery\Delivery\getPathToFile(), and ILIAS\FileDelivery\Delivery\setDownloadFileName().
Referenced by ILIAS\FileDelivery\Delivery\__construct().
|
private |
Definition at line 219 of file Delivery.php.
References $info, ilMimeTypeUtil\APPLICATION__OCTET_STREAM, ILIAS\FileDelivery\Delivery\getPathToFile(), ilMimeTypeUtil\lookupMimeType(), and ILIAS\FileDelivery\Delivery\setMimeType().
Referenced by ILIAS\FileDelivery\Delivery\__construct().
ILIAS\FileDelivery\Delivery::generateEtag | ( | ) |
Definition at line 204 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\getPathToFile(), and ILIAS\FileDelivery\Delivery\setEtag().
Referenced by ILIAS\FileDelivery\Delivery\checkCache().
ILIAS\FileDelivery\Delivery::getDeliveryType | ( | ) |
Definition at line 301 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$delivery_type.
Referenced by ILIAS\FileDelivery\Delivery\deliver(), ILIAS\FileDelivery\Delivery\delivery(), ILIAS\FileDelivery\Delivery\detemineDeliveryType(), and ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::getDisposition | ( | ) |
Definition at line 373 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$disposition.
Referenced by ILIAS\FileDelivery\Delivery\setDispositionHeaders().
ILIAS\FileDelivery\Delivery::getDownloadFileName | ( | ) |
Definition at line 355 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$download_file_name.
Referenced by ILIAS\FileDelivery\Delivery\cleanDownloadFileName(), ILIAS\FileDelivery\Delivery\determineDownloadFileName(), ILIAS\FileDelivery\Delivery\setDispositionHeaders(), and ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::getEtag | ( | ) |
Definition at line 445 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$etag.
Referenced by ILIAS\FileDelivery\Delivery\sendEtagHeader().
ILIAS\FileDelivery\Delivery::getMimeType | ( | ) |
Definition at line 319 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$mime_type.
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::getPathToFile | ( | ) |
Definition at line 337 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$path_to_file.
Referenced by ILIAS\FileDelivery\Delivery\checkExisting(), ILIAS\FileDelivery\Delivery\deliver(), ILIAS\FileDelivery\Delivery\detemineDeliveryType(), ILIAS\FileDelivery\Delivery\determineDownloadFileName(), ILIAS\FileDelivery\Delivery\determineMimeType(), ILIAS\FileDelivery\Delivery\generateEtag(), ILIAS\FileDelivery\Delivery\sendLastModified(), and ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::getShowLastModified | ( | ) |
Definition at line 463 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$show_last_modified.
Referenced by ILIAS\FileDelivery\Delivery\sendLastModified().
ILIAS\FileDelivery\Delivery::hasCache | ( | ) |
Definition at line 499 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$cache.
Referenced by ILIAS\FileDelivery\Delivery\checkCache().
ILIAS\FileDelivery\Delivery::hasHashFilename | ( | ) |
Definition at line 517 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$hash_filename.
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::isConvertFileNameToAsci | ( | ) |
Definition at line 427 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$convert_file_name_to_asci.
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
|
static |
Definition at line 581 of file Delivery.php.
ILIAS\FileDelivery\Delivery::isDeleteFile | ( | ) |
Definition at line 706 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$delete_file.
Referenced by ILIAS\FileDelivery\Delivery\deliver().
ILIAS\FileDelivery\Delivery::isExitAfter | ( | ) |
Definition at line 409 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$exit_after.
Referenced by ILIAS\FileDelivery\Delivery\deliver().
ILIAS\FileDelivery\Delivery::isHasContext | ( | ) |
Definition at line 481 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$has_context.
ILIAS\FileDelivery\Delivery::isSendMimeType | ( | ) |
Definition at line 391 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$send_mime_type.
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
|
static |
Converts a UTF-8 filename to ASCII.
$original_filename | string UFT8-Filename |
Implementation note: The proper way to convert charsets is mb_convert_encoding. Unfortunately Multibyte String functions are not an installation requirement for ILIAS 3. Codelines behind three slashes '///' show how we would do it using mb_convert_encoding. Note that mb_convert_encoding has the bad habit of substituting unconvertable characters with HTML entitities. Thats why we need a regular expression which replaces HTML entities with their first character. e.g. ä => a
$ascii_filename = mb_convert_encoding($a_filename,'US-ASCII','UTF-8'); $ascii_filename = preg_replace('/&(.)[^;]*;/','\1', $ascii_filename);
Definition at line 657 of file Delivery.php.
References $ascii_filename, and array.
|
private |
Definition at line 532 of file Delivery.php.
References $response, and ILIAS\FileDelivery\Delivery\getEtag().
Referenced by ILIAS\FileDelivery\Delivery\checkCache(), and ILIAS\FileDelivery\Delivery\setCachingHeaders().
|
private |
Definition at line 541 of file Delivery.php.
References $response, date, ILIAS\FileDelivery\Delivery\getPathToFile(), and ILIAS\FileDelivery\Delivery\getShowLastModified().
Referenced by ILIAS\FileDelivery\Delivery\setCachingHeaders().
ILIAS\FileDelivery\Delivery::setCache | ( | $cache | ) |
boolean | $cache |
Definition at line 508 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$cache.
ILIAS\FileDelivery\Delivery::setCachingHeaders | ( | ) |
Definition at line 194 of file Delivery.php.
References $response, ILIAS\HTTP\Response\ResponseHeader\CACHE_CONTROL, ILIAS\HTTP\Response\ResponseHeader\PRAGMA, ILIAS\FileDelivery\Delivery\sendEtagHeader(), and ILIAS\FileDelivery\Delivery\sendLastModified().
Referenced by ILIAS\FileDelivery\Delivery\checkCache().
ILIAS\FileDelivery\Delivery::setConvertFileNameToAsci | ( | $convert_file_name_to_asci | ) |
boolean | $convert_file_name_to_asci |
Definition at line 436 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$convert_file_name_to_asci.
|
static |
bool | $DEBUG |
Definition at line 590 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$DEBUG.
ILIAS\FileDelivery\Delivery::setDeleteFile | ( | $delete_file | ) |
bool | $delete_file |
Definition at line 717 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$delete_file.
ILIAS\FileDelivery\Delivery::setDeliveryType | ( | $delivery_type | ) |
string | $delivery_type |
Definition at line 310 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$delivery_type.
Referenced by ILIAS\FileDelivery\Delivery\detemineDeliveryType(), and ILIAS\FileDelivery\Delivery\stream().
ILIAS\FileDelivery\Delivery::setDisposition | ( | $disposition | ) |
string | $disposition |
Definition at line 382 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$disposition.
|
private |
Definition at line 724 of file Delivery.php.
References $response, ILIAS\HTTP\Response\ResponseHeader\CONTENT_DISPOSITION, ILIAS\FileDelivery\Delivery\getDisposition(), and ILIAS\FileDelivery\Delivery\getDownloadFileName().
Referenced by ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::setDownloadFileName | ( | $download_file_name | ) |
string | $download_file_name |
Definition at line 364 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$download_file_name.
Referenced by ILIAS\FileDelivery\Delivery\cleanDownloadFileName(), ILIAS\FileDelivery\Delivery\determineDownloadFileName(), and ILIAS\FileDelivery\Delivery\setGeneralHeaders().
ILIAS\FileDelivery\Delivery::setEtag | ( | $etag | ) |
string | $etag |
Definition at line 454 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$etag.
Referenced by ILIAS\FileDelivery\Delivery\generateEtag().
ILIAS\FileDelivery\Delivery::setExitAfter | ( | $exit_after | ) |
boolean | $exit_after |
Definition at line 418 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$exit_after.
ILIAS\FileDelivery\Delivery::setGeneralHeaders | ( | ) |
Definition at line 167 of file Delivery.php.
References $response, ILIAS\HTTP\Response\ResponseHeader\ACCEPT_RANGES, ILIAS\FileDelivery\Delivery\checkExisting(), ILIAS\FileDelivery\Delivery\cleanDownloadFileName(), ILIAS\HTTP\Response\ResponseHeader\CONNECTION, ILIAS\HTTP\Response\ResponseHeader\CONTENT_LENGTH, ILIAS\HTTP\Response\ResponseHeader\CONTENT_TYPE, ILIAS\FileDelivery\Delivery\getDeliveryType(), ILIAS\FileDelivery\Delivery\getDownloadFileName(), ILIAS\FileDelivery\Delivery\getMimeType(), ILIAS\FileDelivery\Delivery\getPathToFile(), ILIAS\FileDelivery\Delivery\hasHashFilename(), ILIAS\FileDelivery\Delivery\isConvertFileNameToAsci(), ILIAS\FileDelivery\Delivery\isSendMimeType(), ILIAS\FileDelivery\FileDeliveryTypes\DeliveryMethod\PHP, ILIAS\FileDelivery\Delivery\setDispositionHeaders(), and ILIAS\FileDelivery\Delivery\setDownloadFileName().
Referenced by ILIAS\FileDelivery\Delivery\deliver().
ILIAS\FileDelivery\Delivery::setHasContext | ( | $has_context | ) |
boolean | $has_context |
Definition at line 490 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$has_context.
Referenced by ILIAS\FileDelivery\Delivery\__construct().
ILIAS\FileDelivery\Delivery::setHashFilename | ( | $hash_filename | ) |
boolean | $hash_filename |
Definition at line 526 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$hash_filename.
ILIAS\FileDelivery\Delivery::setMimeType | ( | $mime_type | ) |
string | $mime_type |
Definition at line 328 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$mime_type.
Referenced by ILIAS\FileDelivery\Delivery\determineMimeType().
ILIAS\FileDelivery\Delivery::setPathToFile | ( | $path_to_file | ) |
string | $path_to_file |
Definition at line 346 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$path_to_file.
Referenced by ILIAS\FileDelivery\Delivery\__construct().
ILIAS\FileDelivery\Delivery::setSendMimeType | ( | $send_mime_type | ) |
boolean | $send_mime_type |
Definition at line 400 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$send_mime_type.
ILIAS\FileDelivery\Delivery::setShowLastModified | ( | $show_last_modified | ) |
boolean | $show_last_modified |
Definition at line 472 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\$show_last_modified.
Referenced by ILIAS\FileDelivery\Delivery\checkCache().
ILIAS\FileDelivery\Delivery::stream | ( | ) |
Definition at line 127 of file Delivery.php.
References ILIAS\FileDelivery\Delivery\deliver(), ILIAS\FileDelivery\Delivery\delivery(), ILIAS\FileDelivery\FileDeliveryTypes\DeliveryMethod\PHP_CHUNKED, and ILIAS\FileDelivery\Delivery\setDeliveryType().
|
private |
Definition at line 83 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\hasCache(), and ILIAS\FileDelivery\Delivery\setCache().
|
private |
Definition at line 67 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\isConvertFileNameToAsci(), and ILIAS\FileDelivery\Delivery\setConvertFileNameToAsci().
|
staticprivate |
Definition at line 95 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\setDEBUG().
|
private |
Definition at line 91 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\isDeleteFile(), and ILIAS\FileDelivery\Delivery\setDeleteFile().
|
private |
Definition at line 39 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\getDeliveryType(), and ILIAS\FileDelivery\Delivery\setDeliveryType().
|
staticprivate |
Definition at line 35 of file Delivery.php.
|
private |
Definition at line 55 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\getDisposition(), and ILIAS\FileDelivery\Delivery\setDisposition().
|
private |
Definition at line 51 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\cleanDownloadFileName(), ILIAS\FileDelivery\Delivery\determineDownloadFileName(), ILIAS\FileDelivery\Delivery\getDownloadFileName(), and ILIAS\FileDelivery\Delivery\setDownloadFileName().
|
private |
Definition at line 71 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\getEtag(), and ILIAS\FileDelivery\Delivery\setEtag().
|
private |
Definition at line 63 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\isExitAfter(), and ILIAS\FileDelivery\Delivery\setExitAfter().
|
private |
Definition at line 103 of file Delivery.php.
|
private |
Definition at line 79 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\isHasContext(), and ILIAS\FileDelivery\Delivery\setHasContext().
|
private |
Definition at line 87 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\hasHashFilename(), and ILIAS\FileDelivery\Delivery\setHashFilename().
|
private |
Definition at line 99 of file Delivery.php.
|
private |
Definition at line 43 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\getMimeType(), and ILIAS\FileDelivery\Delivery\setMimeType().
|
private |
Definition at line 47 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\__construct(), ILIAS\FileDelivery\Delivery\getPathToFile(), and ILIAS\FileDelivery\Delivery\setPathToFile().
|
private |
Definition at line 59 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\isSendMimeType(), and ILIAS\FileDelivery\Delivery\setSendMimeType().
|
private |
Definition at line 75 of file Delivery.php.
Referenced by ILIAS\FileDelivery\Delivery\getShowLastModified(), and ILIAS\FileDelivery\Delivery\setShowLastModified().
const ILIAS\FileDelivery\Delivery::DIRECT_PHP_OUTPUT = 'php://output' |
Definition at line 29 of file Delivery.php.
const ILIAS\FileDelivery\Delivery::DISP_ATTACHMENT = 'attachment' |
Definition at line 30 of file Delivery.php.
const ILIAS\FileDelivery\Delivery::DISP_INLINE = 'inline' |
Definition at line 31 of file Delivery.php.