ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
FileServices.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS;
22
45
46class FileServices implements Component
47{
48 public function init(
49 array|\ArrayAccess &$define,
50 array|\ArrayAccess &$implement,
51 array|\ArrayAccess &$use,
52 array|\ArrayAccess &$contribute,
53 array|\ArrayAccess &$seek,
54 array|\ArrayAccess &$provide,
55 array|\ArrayAccess &$pull,
56 array|\ArrayAccess &$internal,
57 ): void {
58 $define[] = UploadRestrictionBypass::class;
59 $define[] = Download\DownloadLimit::class;
60
61 $implement[UploadRestrictionBypass::class] = static fn() => new UploadRestrictionBypassLegacyProxy();
62 $implement[PhpUploadLimit::class] = static fn() => new FileServicesLegacyInitialisationAdapter(
63 );
64 $implement[GlobalUploadLimit::class] = static fn(
66
67 $contribute[Agent::class] = static fn() => new \ilFileServicesSetupAgent(
68 $pull[Factory::class]
69 );
70
71 $contribute[PreProcessor::class] = static fn() =>
72 new FileServicesPreProcessor($use[FilesystemConfig::class]);
73 $contribute[LanguageFileDirectory::class] = fn() => new ComponentLanguageFileDirectory(
74 $this,
75 'fils'
76 );
77
78 $contribute[Value::class] = static fn() => new Download\CopyDefinition();
79 $contribute[Task::class] = static fn() =>
80 new Download\CollectFilesJob(
81 $use[LoggerFactoryInterface::class]->getLazy('cal'),
82 $use[Access::class],
83 $internal[RepositoryTreeProxy::class]
84 );
85 $contribute[Task::class] = static fn() =>
86 new Download\CheckSumOfFileSizesJob(
87 $use[LoggerFactoryInterface::class]->getLazy('cal'),
88 $use[Access::class],
89 $internal[RepositoryTreeProxy::class],
90 $use[Download\DownloadLimit::class]
91 );
92 $contribute[Task::class] = static fn() =>
93 new Download\CopyFilesToTempDirectoryJob(
94 $use[LoggerFactoryInterface::class]->getLazy('cal')
95 );
96 $contribute[Task::class] = static fn() =>
97 new Download\ZipJob(
98 $use[LoggerFactoryInterface::class]->getLazy('cal'),
99 new Archives()
100 );
101 $contribute[Task::class] = static fn() =>
102 new Download\DownloadZipInteraction(
103 $use[LoggerFactoryInterface::class]->getLazy('cal'),
104 $use[FilesystemTemp::class]
105 );
106 $contribute[Task::class] = static fn() =>
107 new Download\SumOfFileSizesTooLargeInteraction(
108 $use[Language::class]
109 );
110
111 // names of buckets created before ILIAS 12, remove with ILIAS 13
112 $contribute[Value::class] = static fn() => new \ilCopyDefinition();
113 $contribute[Task::class] = static fn() =>
114 new \ilCollectFilesJob(
115 $use[LoggerFactoryInterface::class]->getLazy('cal'),
116 $use[Access::class],
117 $internal[RepositoryTreeProxy::class]
118 );
119 $contribute[Task::class] = static fn() =>
120 new \ilCheckSumOfFileSizesJob(
121 $use[LoggerFactoryInterface::class]->getLazy('cal'),
122 $use[Access::class],
123 $internal[RepositoryTreeProxy::class],
124 $use[Download\DownloadLimit::class]
125 );
126 $contribute[Task::class] = static fn() =>
127 new \ilCopyFilesToTempDirectoryJob(
128 $use[LoggerFactoryInterface::class]->getLazy('cal')
129 );
130 $contribute[Task::class] = static fn() =>
131 new \ilZipJob(
132 $use[LoggerFactoryInterface::class]->getLazy('cal'),
133 new Archives()
134 );
135 $contribute[Task::class] = static fn() =>
136 new \ilDownloadZipInteraction(
137 $use[LoggerFactoryInterface::class]->getLazy('cal'),
138 $use[FilesystemTemp::class]
139 );
140 $contribute[Task::class] = static fn() =>
141 new \ilSumOfFileSizesTooLargeInteraction(
142 $use[Language::class]
143 );
144
145 $internal[RepositoryTreeProxy::class] = static fn() => new RepositoryTreeProxy();
146 }
147}
Builds data types.
Definition: Factory.php:36
The part of the repository tree the download jobs walk when they collect files.
Resolves the bypass permission through the legacy container, since the public RBAC surface of AccessC...
Rejects uploads with extensions blacklisted in the file services settings.
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
Public access-handling service of the AccessControl component.
Definition: Access.php:31
Tells whether the current user holds the permission of the file services administration to upload fil...
A directory of language files with a path and a prefix for them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Job.php:19
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.