ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
Services.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ilMDSettings;
29use ILIAS\DI\Container as GlobalContainer;
30use ILIAS\MetaData\Editor\Services\InternalServices as InternalEditorServices;
32use ILIAS\MetaData\DataHelper\Services\Services as DataHelperServices;
33use ILIAS\MetaData\Copyright\Services\Services as CopyrightServices;
34use ILIAS\MetaData\OERHarvester\Services\Services as PublishingServices;
35
37{
38 protected Digest $digest;
43
44 public function __construct(
45 protected GlobalContainer $dic,
46 protected InternalEditorServices $internal_editor_services,
47 protected PathServices $path_services,
48 protected DataHelperServices $data_helper_services,
49 protected CopyrightServices $copyright_services,
50 protected PublishingServices $publishing_services
51 ) {
52 }
53
54 public function digest(): Digest
55 {
56 return $this->digest ??= new Digest(
57 $this->contentAssembler()
58 );
59 }
60
62 {
63 return $this->manipulator_adapter ??= new ManipulatorAdapter(
64 $this->contentAssembler(),
65 $this->copyrightHandler(),
66 $this->pathCollection(),
67 $this->internal_editor_services->manipulator(),
68 $this->path_services->pathFactory(),
69 $this->path_services->navigatorFactory(),
70 $this->internal_editor_services->vocabularyAdapter()
71 );
72 }
73
74 protected function contentAssembler(): ContentAssembler
75 {
76 return $this->content_assembler ??= new ContentAssembler(
77 $this->path_services->pathFactory(),
78 $this->path_services->navigatorFactory(),
79 $this->dic->ui()->factory(),
80 $this->dic->refinery(),
81 $this->internal_editor_services->presenter(),
82 $this->pathCollection(),
83 $this->internal_editor_services->linkFactory(),
84 $this->copyrightHandler(),
85 $this->data_helper_services->dataHelper(),
86 $this->internal_editor_services->vocabularyAdapter()
87 );
88 }
89
90 protected function copyrightHandler(): CopyrightHandler
91 {
92 return $this->copyright_handler ??= new CopyrightHandler(
93 $this->copyright_services->repository(),
95 $this->publishing_services->settings(),
96 $this->copyright_services->identifiersHandler()
97 );
98 }
99
100 protected function pathCollection(): PathCollection
101 {
102 return $this->path_collection ??= new PathCollection(
103 $this->path_services->pathFactory()
104 );
105 }
106}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
__construct(protected GlobalContainer $dic, protected InternalEditorServices $internal_editor_services, protected PathServices $path_services, protected DataHelperServices $data_helper_services, protected CopyrightServices $copyright_services, protected PublishingServices $publishing_services)
Definition: Services.php:44
$dic
Definition: ltiresult.php:33