ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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,)
 

Private Member Functions

 deliver (string $path_to_file, Disposition $disposition, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from ILIAS\FileDelivery\Delivery\BaseDelivery
const MIME_TYPE_MAP = __DIR__ . '/../../../FileUpload/src/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 28 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 30 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().

35  : never {
36  $this->deliver(
38  Disposition::ATTACHMENT,
40  $mime_type,
42  );
43  }
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 
)
private

Definition at line 60 of file LegacyDelivery.php.

References ILIAS\FileDelivery\Delivery\$disposition, ILIAS\FileDelivery\Delivery\$path_to_file, $r, ILIAS\FileDelivery\http(), null, 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().

66  : never {
67  $r = $this->setGeneralHeaders(
68  $this->http->response(),
70  $mime_type ?? mime_content_type($path_to_file),
73  );
74  $r = $this->response_builder->buildForStream(
75  $this->http->request(),
76  $r,
78  );
80  }
setGeneralHeaders(ResponseInterface $r, string $uri, string $mime_type, string $file_name, Disposition $disposition=Disposition::INLINE)
saveAndClose(ResponseInterface $r, ?string $path_to_delete=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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.
$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 45 of file LegacyDelivery.php.

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

50  : never {
51  $this->deliver(
53  Disposition::INLINE,
55  $mime_type,
57  );
58  }
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: