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
23use ILIAS\Data\Factory as DataFactory;
25use ILIAS\Export\ImportHandler\I\FactoryInterface as ImportHandlerFactoryInterface;
30use ILIAS\Export\ImportHandler\I\SchemaFolder\FactoryInterface as SchemaFolderFactoryInterface;
31use ILIAS\Export\ImportHandler\I\Validation\FactoryInterface as ValidationFactoryInterface;
38use ILIAS\Export\ImportStatus\ilFactory as ImportStatusFactory;
39use ilLanguage;
40use ilLogger;
41
42class Factory implements ImportHandlerFactoryInterface
43{
44 protected ilLogger $logger;
45 protected ilLanguage $lng;
46 protected ImportStatusFactory $import_status_factory;
47 protected DataFactory $data_factory;
48 protected SchemaFolderInterface $schema_folder;
49
50 public function __construct()
51 {
52 global $DIC;
53 $this->logger = $DIC->logger()->root();
54 $this->lng = $DIC->language();
55 $this->lng->loadLanguageModule("exp");
56 $this->import_status_factory = new ImportStatusFactory();
57 $this->data_factory = new DataFactory();
58 $this->schema_folder = $this->schemaFolder()->handler();
59 }
60
61 public function parser(): ParserFactoryInterface
62 {
63 return new ParserFactory(
64 $this,
65 $this->logger
66 );
67 }
68
69 public function file(): FileFactoryInterface
70 {
71 return new FileFactory(
72 $this,
73 $this->import_status_factory,
74 $this->logger,
75 $this->lng,
76 $this->data_factory,
77 $this->schema_folder
78 );
79 }
80
81 public function schema(): SchemaFactoryInterface
82 {
83 return new SchemaFactory(
84 $this->schema_folder,
85 $this,
86 $this->data_factory,
87 $this->logger
88 );
89 }
90
91 public function schemaFolder(): SchemaFolderFactoryInterface
92 {
93 return new SchemaFolderFactory(
94 $this,
95 $this->logger
96 );
97 }
98
99 public function path(): PathFactoryInterface
100 {
101 return new PathFactory(
102 $this->logger
103 );
104 }
105
106 public function validation(): ValidationFactoryInterface
107 {
108 return new ValidationFactory(
109 $this->import_status_factory,
110 $this,
111 $this->logger
112 );
113 }
114}
Builds data types.
Definition: Factory.php:36
ImportStatusFactory $import_status_factory
Definition: Factory.php:46
SchemaFolderInterface $schema_folder
Definition: Factory.php:48
language handling
Component logger with individual log levels by component id.
global $DIC
Definition: shib_login.php:26