ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Services.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
30 use ILIAS\MetaData\Paths\Services\Services as PathServices;
31 use ILIAS\MetaData\Structure\Services\Services as StructureServices;
32 use ILIAS\MetaData\Repository\Dictionary\TagFactory as RepositoryTagFactory;
34 use ILIAS\MetaData\Elements\Factory as ElementFactory;
42 use ILIAS\MetaData\Vocabularies\Services\Services as VocabulariesServices;
43 use ILIAS\MetaData\DataHelper\Services\Services as DataHelperServices;
50 use ILIAS\MetaData\Manipulator\Services\Services as ManipulatorServices;
52 
53 class Services
54 {
58 
59 
60  protected GlobalContainer $dic;
61  protected PathServices $path_services;
62  protected StructureServices $structure_services;
63  protected VocabulariesServices $vocabularies_services;
64  protected DataHelperServices $data_helper_services;
65  protected ManipulatorServices $manipulator_services;
66 
67  public function __construct(
68  GlobalContainer $dic,
69  PathServices $path_services,
70  StructureServices $structure_services,
71  VocabulariesServices $vocabularies_services,
72  DataHelperServices $data_helper_services,
73  ManipulatorServices $manipulator_services
74  ) {
75  $this->dic = $dic;
76  $this->path_services = $path_services;
77  $this->structure_services = $structure_services;
78  $this->vocabularies_services = $vocabularies_services;
79  $this->data_helper_services = $data_helper_services;
80  $this->manipulator_services = $manipulator_services;
81  }
82 
84  {
85  if (isset($this->validation_dictionary)) {
87  }
88  return $this->validation_dictionary = (new ValidationDictionaryInitiator(
89  new ValidationTagFactory(),
90  $this->path_services->pathFactory(),
91  $this->path_services->navigatorFactory(),
92  $this->structure_services->structure()
93  ))->get();
94  }
95 
97  {
98  if (isset($this->repository_dictionary)) {
100  }
101  return $this->repository_dictionary = (new RepositoryDictionaryInitiator(
102  new RepositoryTagFactory(),
103  $this->path_services->pathFactory(),
104  $this->path_services->navigatorFactory(),
105  $this->structure_services->structure()
106  ))->get();
107  }
108 
109  public function repository(): RepositoryInterface
110  {
111  if (isset($this->repository)) {
112  return $this->repository;
113  }
114  $logger = $this->dic->logger()->meta();
115  $data_factory = new DataFactory();
116  $querier = new DatabaseQuerier(
117  new ResultFactory(),
118  $this->dic->database(),
119  $logger
120  );
121  $element_factory = new ElementFactory($data_factory);
122  return $this->repository = new LOMDatabaseRepository(
123  $ressource_id_factory = new RessourceIDFactory(),
125  $this->databaseDictionary(),
126  $querier,
127  new AssignmentFactory(),
128  $logger
129  ),
130  new DatabaseReader(
131  $element_factory,
132  $this->structure_services->structure(),
133  $this->databaseDictionary(),
134  $this->path_services->navigatorFactory(),
135  $this->path_services->pathFactory(),
136  $querier,
137  $logger
138  ),
139  new DatabaseSearcher(
140  $ressource_id_factory,
142  $this->dic->database(),
143  $this->structure_services->structure(),
144  $this->databaseDictionary(),
145  $this->path_services->navigatorFactory()
146  ),
147  $this->dic->database()
148  ),
149  new Processor(
150  $element_factory,
151  new MarkerFactory(),
152  $this->structure_services->structure(),
153  new DataValidator(
154  new DataValidatorService($this->data_helper_services->dataHelper())
155  ),
156  $this->constraintDictionary(),
157  $this->vocabularies_services->elementHelper(),
158  $logger
159  ),
160  new IdentifierHandler(
161  $this->manipulator_services->manipulator(),
162  $this->path_services->pathFactory()
163  )
164  );
165  }
166 }
ValidationDictionary $validation_dictionary
Definition: Services.php:56
__construct(GlobalContainer $dic, PathServices $path_services, StructureServices $structure_services, VocabulariesServices $vocabularies_services, DataHelperServices $data_helper_services, ManipulatorServices $manipulator_services)
Definition: Services.php:67
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
VocabulariesServices $vocabularies_services
Definition: Services.php:63
RepositoryDictionary $repository_dictionary
Definition: Services.php:57