ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilFactory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ilLanguage;
24 use ilLogger;
26 use ILIAS\Export\ImportHandler\I\File\ilFactoryInterface as ilFileFactoryInterface;
27 use ILIAS\Export\ImportHandler\I\ilFactoryInterface as ilImportHandlerFactoryInterface;
28 use ILIAS\Export\ImportHandler\I\Parser\ilFactoryInterface as ilParserFactoryInterface;
29 use ILIAS\Export\ImportHandler\Parser\ilFactory as ilParserFactory;
31 
32 class ilFactory implements ilImportHandlerFactoryInterface
33 {
34  protected ilLogger $logger;
35  protected ilLanguage $lng;
37 
38 
39  public function __construct()
40  {
41  global $DIC;
42  $this->logger = $DIC->logger()->root();
43  $this->lng = $DIC->language();
44  $this->lng->loadLanguageModule("exp");
45  $this->schema_factory = new ilXmlSchemaFactory();
46  }
47 
48  public function parser(): ilParserFactoryInterface
49  {
50  return new ilParserFactory($this->logger);
51  }
52 
53  public function file(): ilFileFactoryInterface
54  {
55  return new ilFileFactory(
56  $this->logger,
57  $this->lng,
58  $this->schema_factory
59  );
60  }
61 }
global $DIC
Definition: feed.php:28