ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\LegalDocuments\Consumer\ConsumerFactory Class Reference

Class ConsumerFactory. More...

+ Collaboration diagram for ILIAS\LegalDocuments\Consumer\ConsumerFactory:

Public Member Functions

 __construct (private StreamAccess $stream_access, protected FileNamePolicy $file_name_policy=new NoneFileNamePolicy())
 ConsumerFactory constructor. More...
 
 download (StorableResource $resource)
 
 inline (StorableResource $resource)
 
 fileStream (StorableResource $resource)
 
 absolutePath (StorableResource $resource)
 
 src (StorableResource $resource, SrcBuilder $src_builder)
 
 flavourUrl (Flavour $flavour, SrcBuilder $src_builder)
 
 downloadMultiple (array $resources, ?string $zip_filename=null)
 
 containerZIP (StorableContainerResource $resource,)
 
 containerURI (StorableContainerResource $resource, SrcBuilder $src_builder, string $start_file='index.html', float $valid_for_at_least_minutes=120.0)
 

Private Attributes

Services $http
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::__construct ( private StreamAccess  $stream_access,
protected FileNamePolicy  $file_name_policy = new NoneFileNamePolicy() 
)

ConsumerFactory constructor.

Parameters
FileNamePolicy | null$file_name_policy

Definition at line 46 of file ConsumerFactory.php.

References $DIC, and ILIAS\FileDelivery\http().

49  {
50  global $DIC;
51  $this->http = $DIC->http();
52  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ absolutePath()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::absolutePath ( StorableResource  $resource)
Deprecated:

Definition at line 85 of file ConsumerFactory.php.

85  : AbsolutePathConsumer
86  {
87  return new AbsolutePathConsumer(
88  $resource,
89  $this->stream_access,
90  $this->file_name_policy
91  );
92  }

◆ containerURI()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::containerURI ( StorableContainerResource  $resource,
SrcBuilder  $src_builder,
string  $start_file = 'index.html',
float  $valid_for_at_least_minutes = 120.0 
)

Definition at line 132 of file ConsumerFactory.php.

137  : ContainerConsumer {
138  return new ContainerURIConsumer(
139  $src_builder,
140  $resource,
141  $this->stream_access,
142  $start_file,
143  $valid_for_at_least_minutes
144  );
145  }

◆ containerZIP()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::containerZIP ( StorableContainerResource  $resource)

Definition at line 123 of file ConsumerFactory.php.

125  : ContainerConsumer {
126  return new ContainerZIPAccessConsumer(
127  $resource,
128  $this->stream_access
129  );
130  }

◆ download()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::download ( StorableResource  $resource)

Definition at line 54 of file ConsumerFactory.php.

References ILIAS\FileDelivery\http().

54  : DownloadConsumer
55  {
56  return new DownloadConsumer(
57  $this->http,
58  $resource,
59  $this->stream_access,
60  $this->file_name_policy
61  );
62  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ downloadMultiple()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::downloadMultiple ( array  $resources,
?string  $zip_filename = null 
)

Definition at line 111 of file ConsumerFactory.php.

114  : DownloadMultipleConsumer {
115  return new DownloadMultipleConsumer(
116  $resources,
117  $this->stream_access,
118  $this->file_name_policy,
119  $zip_filename ?? 'Download.zip'
120  );
121  }
$resources
Definition: ltiservices.php:65

◆ fileStream()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::fileStream ( StorableResource  $resource)

Definition at line 74 of file ConsumerFactory.php.

74  : FileStreamConsumer
75  {
76  return new FileStreamConsumer(
77  $resource,
78  $this->stream_access
79  );
80  }

◆ flavourUrl()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::flavourUrl ( Flavour  $flavour,
SrcBuilder  $src_builder 
)

Definition at line 103 of file ConsumerFactory.php.

103  : FlavourURLs
104  {
105  return new FlavourURLs(
106  $src_builder,
107  $flavour
108  );
109  }

◆ inline()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::inline ( StorableResource  $resource)

Definition at line 64 of file ConsumerFactory.php.

References ILIAS\FileDelivery\http().

64  : InlineConsumer
65  {
66  return new InlineConsumer(
67  $this->http,
68  $resource,
69  $this->stream_access,
70  $this->file_name_policy
71  );
72  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ src()

ILIAS\LegalDocuments\Consumer\ConsumerFactory::src ( StorableResource  $resource,
SrcBuilder  $src_builder 
)

Definition at line 94 of file ConsumerFactory.php.

94  : SrcConsumer
95  {
96  return new SrcConsumer(
97  $src_builder,
98  $resource,
99  $this->stream_access
100  );
101  }

Field Documentation

◆ $http

Services ILIAS\LegalDocuments\Consumer\ConsumerFactory::$http
private

Definition at line 40 of file ConsumerFactory.php.


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