ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
InternalServices.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
30use ILIAS\DI\Container as GlobalContainer;
32use ILIAS\MetaData\Structure\Services\Services as StructureServices;
38use ILIAS\Data\Factory as DataFactory;
41use ILIAS\MetaData\Repository\Services\Services as RepositoryServices;
44use ILIAS\MetaData\Manipulator\Services\Services as ManipulatorServices;
45use ILIAS\MetaData\Presentation\Services\Services as PresentationServices;
46use ILIAS\MetaData\Vocabularies\Services\Services as VocabulariesServices;
47use ILIAS\MetaData\Editor\Vocabulary\AdapterInterface as VocabularyAdapterInterface;
48use ILIAS\MetaData\Editor\Vocabulary\Adapter as VocabularyAdapter;
49
51{
58 protected VocabularyAdapterInterface $vocabulary_adapter;
59
60 public function __construct(
61 protected GlobalContainer $dic,
62 protected PathServices $path_services,
63 protected StructureServices $structure_services,
64 protected RepositoryServices $repository_services,
65 protected ManipulatorServices $manipulator_services,
66 protected PresentationServices $presentation_services,
67 protected VocabulariesServices $vocabularies_services
68 ) {
69 }
70
71 public function presenter(): PresenterInterface
72 {
73 return $this->presenter ??= new Presenter(
74 new Utilities(
75 $this->presentation_services->utilities()
76 ),
77 $data = new Data(
78 $this->presentation_services->utilities(),
79 $this->presentation_services->data(),
80 $this->vocabularies_services->presentation()
81 ),
82 new Elements(
83 $data,
84 $this->dictionary(),
85 $this->path_services->navigatorFactory(),
86 $this->presentation_services->elements()
87 ),
88 );
89 }
90
92 {
93 return $this->dictionary ??= (new LOMDictionaryInitiator(
94 new TagFactory($this->path_services->pathFactory()),
95 $this->path_services->pathFactory(),
96 $this->path_services->navigatorFactory(),
97 $this->structure_services->structure()
98 ))->get();
99 }
100
102 {
103 return $this->link_factory ??= new LinkFactory(
104 $this->dic->ctrl(),
105 new DataFactory()
106 );
107 }
108
110 {
111 return $this->request_parser ??= new RequestParser(
112 $this->dic->http(),
113 $this->dic->refinery(),
114 $this->path_services->pathFactory()
115 );
116 }
117
119 {
120 return $this->manipulator ??= new Manipulator(
121 $this->manipulator_services->manipulator(),
122 $this->path_services->navigatorFactory(),
123 $this->repository_services->repository(),
124 $this->manipulator_services->scaffoldProvider()
125 );
126 }
127
129 {
130 return $this->observer_handler ??= new ObserverHandler();
131 }
132
133 public function vocabularyAdapter(): VocabularyAdapterInterface
134 {
135 return $this->vocabulary_adapter ??= new VocabularyAdapter(
136 $this->vocabularies_services->reader(),
137 $this->vocabularies_services->slotElementHelper()
138 );
139 }
140}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Builds data types.
Definition: Factory.php:36
__construct(protected GlobalContainer $dic, protected PathServices $path_services, protected StructureServices $structure_services, protected RepositoryServices $repository_services, protected ManipulatorServices $manipulator_services, protected PresentationServices $presentation_services, protected VocabulariesServices $vocabularies_services)
$dic
Definition: ltiresult.php:33