9 require_once(
'./Services/FileDelivery/interfaces/int.ilFileDeliveryType.php');
37 $this->httpService = $httpState;
45 return is_readable($path_to_file);
57 $this->httpService->saveResponse(
$response);
66 public function deliver($path_to_file, $file_marked_to_delete)
69 if (strpos($path_to_file,
'./' . self::DATA .
'/') === 0) {
70 $path_to_file = str_replace(
'./' . self::DATA .
'/',
'/' . self::SECURED_DATA
71 .
'/', $path_to_file);
74 $response = $this->httpService->response();
75 $delivery =
function () use ($path_to_file,
$response) {
77 $this->httpService->saveResponse(
$response);
78 $this->httpService->sendResponse();
81 if ($file_marked_to_delete) {
82 $this->sendFileUnbufferedUsingHeaders($delivery);
Interface GlobalHttpState.
doesFileExists($path_to_file)
supportsAttachmentDelivery()
bool
supportsInlineDelivery()
bool
prepare($path_to_file)
bool
Interface ilFileDeliveryType.
handleFileDeletion($path_to_file)
bool
__construct(GlobalHttpState $httpState)
PHP constructor.
deliver($path_to_file, $file_marked_to_delete)
absolute path to fileThis is needed at this point for header-based delivery methodsbool ...