9require_once(
'./Services/FileDelivery/interfaces/int.ilFileDeliveryType.php');
 
   20    use  HeaderBasedDeliveryHelper;
 
   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);
 
An exception for terminatinating execution or to throw for unit testing.
supportsInlineDelivery()
bool
supportsAttachmentDelivery()
bool
deliver($path_to_file, $file_marked_to_delete)
bool
__construct(GlobalHttpState $httpState)
PHP constructor.
handleFileDeletion($path_to_file)
bool
prepare($path_to_file)
bool
doesFileExists($path_to_file)
@inheritDoc
Interface ilFileDeliveryType.
Interface GlobalHttpState.