ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Factory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26use ILIAS\Data\Factory as ilDataFactory;
27use ILIAS\DI\UIServices as ilUIServices;
28use ILIAS\Export\ExportHandler\Consumer\Factory as ilExportHandlderConsumerFactory;
29use ILIAS\Export\ExportHandler\I\Consumer\FactoryInterface as ilExportHandlderConsumerFactoryInterface;
30use ILIAS\Export\ExportHandler\I\FactoryInterface as ilExportHandlerFactoryInterface;
31use ILIAS\Export\ExportHandler\I\Info\FactoryInterface as ilExportHandlerInfoFactoryInterface;
32use ILIAS\Export\ExportHandler\I\Manager\FactoryInterface as ilExportHandlerManagerFactoryInterface;
33use ILIAS\Export\ExportHandler\I\Part\FactoryInterface as ilExportHandlerPartFactoryInterface;
34use ILIAS\Export\ExportHandler\I\PublicAccess\FactoryInterface as ilExportHandlerPublicAccessFactoryInterface;
35use ILIAS\Export\ExportHandler\I\Repository\FactoryInterface as ilExportHandlerRepositoryFactoryInterface;
36use ILIAS\Export\ExportHandler\I\Table\FactoryInterface as ilExportHandlerTableFactoryInterface;
37use ILIAS\Export\ExportHandler\I\Target\FactoryInterface as ilExportHandlerTargetFactoryInterface;
38use ILIAS\Export\ExportHandler\I\Wrapper\FactoryInterface as ilExportHandlerWrapperFactoryInterface;
39use ILIAS\Export\ExportHandler\Info\Factory as ilExportHandlerInfoFactory;
40use ILIAS\Export\ExportHandler\Manager\Factory as ilExportHandlerManagerFactory;
41use ILIAS\Export\ExportHandler\Part\Factory as ilExportHandlerPartFactory;
42use ILIAS\Export\ExportHandler\PublicAccess\Factory as ilExportHandlerPublicAccessFactory;
43use ILIAS\Export\ExportHandler\Repository\Factory as ilExportHandlerRepositoryFactory;
44use ILIAS\Export\ExportHandler\Table\Factory as ilExportHandlerTableFactory;
45use ILIAS\Export\ExportHandler\Target\Factory as ilExportHandlerTargetFactory;
46use ILIAS\Export\ExportHandler\Wrapper\Factory as ilExportHandlerWrapperFactory;
48use ILIAS\HTTP\Services as ilHTTPServices;
49use ILIAS\Refinery\Factory as ilRefineryFactory;
50use ILIAS\ResourceStorage\Services as ResourcesStorageService;
51use ILIAS\StaticURL\Services as StaticUrl;
52use ilLanguage;
54use ilObjUser;
55use ilTree;
56
57class Factory implements ilExportHandlerFactoryInterface
58{
59 protected ilDBInterface $db;
60 protected ilLanguage $lng;
62 protected ResourcesStorageService $irss;
65 protected ilObjUser $user;
66 protected ilHTTPServices $http_services;
67 protected ilRefineryFactory $refinery;
68 protected ilUIServices $ui_services;
69 protected ilTree $tree;
72 protected ilDataFactory $data_factory;
73
74 public function __construct()
75 {
76 global $DIC;
77 $this->db = $DIC->database();
78 $this->irss = $DIC->resourceStorage();
79 $this->filesystems = $DIC->filesystem();
80 $this->static_url = $DIC['static_url'];
81 $this->lng = $DIC->language();
82 $this->ctrl = $DIC->ctrl();
83 $this->user = $DIC->user();
84 $this->http_services = $DIC->http();
85 $this->refinery = $DIC->refinery();
86 $this->ui_services = $DIC->ui();
87 $this->obj_definition = $DIC['objDefinition'];
88 $this->tree = $DIC->repositoryTree();
89 $this->access = $DIC->access();
90 $this->data_factory = new ilDataFactory();
91 }
92
93 public function part(): ilExportHandlerPartFactoryInterface
94 {
95 return new ilExportHandlerPartFactory($this);
96 }
97
98 public function info(): ilExportHandlerInfoFactoryInterface
99 {
100 return new ilExportHandlerInfoFactory(
101 $this,
102 $this->irss
103 );
104 }
105
106 public function target(): ilExportHandlerTargetFactoryInterface
107 {
108 return new ilExportHandlerTargetFactory(
109 $this
110 );
111 }
112
113 public function repository(): ilExportHandlerRepositoryFactoryInterface
114 {
115 return new ilExportHandlerRepositoryFactory(
116 $this,
117 $this->db,
118 $this->irss,
119 $this->filesystems
120 );
121 }
122
123 public function publicAccess(): ilExportHandlerPublicAccessFactoryInterface
124 {
125 return new ilExportHandlerPublicAccessFactory(
126 $this,
127 $this->db,
128 $this->static_url
129 );
130 }
131
132 public function manager(): ilExportHandlerManagerFactoryInterface
133 {
134 return new ilExportHandlerManagerFactory(
135 $this,
136 $this->obj_definition,
137 $this->tree,
138 $this->access,
139 $this->wrapper()->dataFactory()->handler()
140 );
141 }
142
143 public function consumer(): ilExportHandlderConsumerFactoryInterface
144 {
145 return new ilExportHandlderConsumerFactory(
146 $this
147 );
148 }
149
150 public function table(): ilExportHandlerTableFactoryInterface
151 {
152 return new ilExportHandlerTableFactory(
153 $this,
154 $this->ui_services,
155 $this->http_services,
156 $this->refinery,
157 $this->user,
158 $this->lng,
159 $this->ctrl,
160 $this->data_factory
161 );
162 }
163
164 public function wrapper(): ilExportHandlerWrapperFactoryInterface
165 {
166 return new ilExportHandlerWrapperFactory(
167 $this->data_factory
168 );
169 }
170}
Provides fluid interface to RBAC services.
Definition: UIServices.php:25
Builds data types.
Definition: Factory.php:36
ResourcesStorageService $irss
Definition: Factory.php:62
ilObjectDefinition $obj_definition
Definition: Factory.php:70
ilRefineryFactory $refinery
Definition: Factory.php:67
Class Services.
Definition: Services.php:38
language handling
User class.
parses the objects.xml it handles the xml-description of all ilias objects
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
The Filesystems interface defines the access methods which can be used to fetch the different filesys...
Definition: Filesystems.php:30
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilDBInterface.
static filesystems()
Returns the loaded filesystems.
global $DIC
Definition: shib_login.php:26