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;
25 use ILIAS\Export\ImportHandler\File\Validation\ilFactory as ilFileValidationFactory;
26 use ILIAS\Export\ImportHandler\File\XML\ilFactory as ilXMLFileFactory;
28 use ILIAS\Export\ImportHandler\File\XSD\ilFactory as ilXSDFileFactory;
30 use ILIAS\Export\ImportHandler\I\File\ilFactoryInterface as ilFileFactoryInterface;
31 use ILIAS\Export\ImportHandler\I\File\Namespace\ilFactoryInterface as ilFileNamespaceFactoryInterface;
32 use ILIAS\Export\ImportHandler\I\File\Path\ilFactoryInterface as ilFilePathFactoryInterface;
33 use ILIAS\Export\ImportHandler\I\File\Validation\ilFactoryInterface as ilFileValidationFactoryInterface;
34 use ILIAS\Export\ImportHandler\I\File\XML\ilFactoryInterface as ilXMLFileFactoryInterface;
35 use ILIAS\Export\ImportHandler\I\File\XML\Manifest\ilFactoryInterface as ilManifestFileFactoryInterface;
36 use ILIAS\Export\ImportHandler\I\File\XSD\ilFactoryInterface as ilXSDFileFactoryInterface;
37 use ILIAS\Export\ImportHandler\I\Parser\ilFactoryInterface as ilParserFactoryInterface;
38 use ILIAS\Export\ImportHandler\File\Path\ilFactory as ilFilePathFactory;
39 use ILIAS\Export\ImportHandler\File\Namespace\ilFactory as ilFileNamespaceFactory;
41 
42 class ilFactory implements ilFileFactory
43 {
44  protected ilLogger $logger;
45  protected ilLanguage $lng;
47 
48  public function __construct(
49  ilLogger $logger,
50  ilLanguage $lng,
51  ilXmlSchemaFactory $schema_factory
52  ) {
53  $this->logger = $logger;
54  $this->lng = $lng;
55  $this->schema_factory = $schema_factory;
56  }
57 
58  public function xml(): ilXMLFileFactoryInterface
59  {
60  return new ilXMLFileFactory(
61  $this->logger,
62  $this->lng,
63  $this->schema_factory
64  );
65  }
66 
67  public function xsd(): ilXSDFileFactoryInterface
68  {
69  return new ilXSDFileFactory();
70  }
71 
72  public function validation(): ilFileValidationFactoryInterface
73  {
74  return new ilFileValidationFactory($this->logger);
75  }
76 
77  public function path(): ilFilePathFactoryInterface
78  {
79  return new ilFilePathFactory($this->logger);
80  }
81 
82  public function namespace(): ilFileNamespaceFactoryInterface
83  {
84  return new ilFileNamespaceFactory();
85  }
86 }
__construct(ilLogger $logger, ilLanguage $lng, ilXmlSchemaFactory $schema_factory)