ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\FileDelivery\Delivery\LegacyDelivery Class Reference
+ Inheritance diagram for ILIAS\FileDelivery\Delivery\LegacyDelivery:
+ Collaboration diagram for ILIAS\FileDelivery\Delivery\LegacyDelivery:

Public Member Functions

 attached (string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
 
 inline (string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
 
- Public Member Functions inherited from ILIAS\FileDelivery\Delivery\BaseDelivery
 __construct (protected Services $http, protected ResponseBuilder $response_builder, protected ResponseBuilder $fallback_response_builder,)
 

Protected Member Functions

 deliver (string $path_to_file, Disposition $disposition, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
 
- Protected Member Functions inherited from ILIAS\FileDelivery\Delivery\BaseDelivery
 saveAndClose (ResponseInterface $r, string $path_to_delete=null)
 
 setGeneralHeaders (ResponseInterface $r, string $uri, string $mime_type, string $file_name, Disposition $disposition=Disposition::INLINE)
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\FileDelivery\Delivery\BaseDelivery
const MIME_TYPE_MAP = __DIR__ . '/../../FileUpload/mime_type_map.php'
 
array $mime_type_map
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 29 of file LegacyDelivery.php.

Member Function Documentation

◆ attached()

ILIAS\FileDelivery\Delivery\LegacyDelivery::attached ( string  $path_to_file,
?string  $download_file_name = null,
?string  $mime_type = null,
?bool  $delete_file = false 
)

Definition at line 31 of file LegacyDelivery.php.

References ILIAS\FileDelivery\Delivery\$delete_file, ILIAS\FileDelivery\Delivery\$download_file_name, ILIAS\FileDelivery\Delivery\$mime_type, and ILIAS\FileDelivery\Delivery\LegacyDelivery\deliver().

36  : never {
37  $this->deliver(
39  Disposition::ATTACHMENT,
41  $mime_type,
43  );
44  }
deliver(string $path_to_file, Disposition $disposition, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
+ Here is the call graph for this function:

◆ deliver()

ILIAS\FileDelivery\Delivery\LegacyDelivery::deliver ( string  $path_to_file,
Disposition  $disposition,
?string  $download_file_name = null,
?string  $mime_type = null,
?bool  $delete_file = false 
)
protected

Definition at line 61 of file LegacyDelivery.php.

References ILIAS\FileDelivery\Delivery\$disposition, ILIAS\FileDelivery\Delivery\$path_to_file, $r, ILIAS\FileDelivery\http(), ILIAS\Filesystem\Stream\Streams\ofResource(), ILIAS\FileDelivery\Delivery\BaseDelivery\saveAndClose(), and ILIAS\FileDelivery\Delivery\BaseDelivery\setGeneralHeaders().

Referenced by ILIAS\FileDelivery\Delivery\LegacyDelivery\attached(), and ILIAS\FileDelivery\Delivery\LegacyDelivery\inline().

67  : never {
68  $r = $this->setGeneralHeaders(
69  $this->http->response(),
71  $mime_type ?? mime_content_type($path_to_file),
74  );
75  $r = $this->response_builder->buildForStream(
76  $this->http->request(),
77  $r,
79  );
80  $this - $this->saveAndClose($r, $delete_file ? $path_to_file : null);
81  }
setGeneralHeaders(ResponseInterface $r, string $uri, string $mime_type, string $file_name, Disposition $disposition=Disposition::INLINE)
static ofResource($resource)
Wraps an already created resource with the stream abstraction.
Definition: Streams.php:64
static http()
Fetches the global http state from ILIAS.
saveAndClose(ResponseInterface $r, string $path_to_delete=null)
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inline()

ILIAS\FileDelivery\Delivery\LegacyDelivery::inline ( string  $path_to_file,
?string  $download_file_name = null,
?string  $mime_type = null,
?bool  $delete_file = false 
)

Definition at line 46 of file LegacyDelivery.php.

References ILIAS\FileDelivery\Delivery\LegacyDelivery\deliver().

51  : never {
52  $this->deliver(
54  Disposition::INLINE,
56  $mime_type,
58  );
59  }
deliver(string $path_to_file, Disposition $disposition, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: