ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Services.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\DI\Container as GlobalContainer;
24use ILIAS\MetaData\Search\Services\Services as SearchServices;
35
37{
42
43 protected GlobalContainer $dic;
44 protected SearchServices $search_services;
45 protected PathsServices $paths_services;
46
47 public function __construct(
48 GlobalContainer $dic,
49 SearchServices $repository_services,
50 PathsServices $paths_services,
51 ) {
52 $this->dic = $dic;
53 $this->search_services = $repository_services;
54 $this->paths_services = $paths_services;
55 }
56
58 {
59 if (isset($this->repository)) {
60 return $this->repository;
61 }
62 return $this->repository = new DatabaseRepository(
63 new Wrapper($this->dic->database())
64 );
65 }
66
67 public function renderer(): RendererInterface
68 {
69 if (isset($this->renderer)) {
70 return $this->renderer;
71 }
72 return $this->renderer = new Renderer(
73 $this->dic->ui()->factory(),
74 $this->dic->resourceStorage()
75 );
76 }
77
79 {
80 if (isset($this->handler)) {
81 return $this->handler;
82 }
83 return $this->handler = new Handler();
84 }
85
87 {
88 if (isset($this->searcher_factory)) {
90 }
91 return $this->searcher_factory = new Factory(
92 $this->search_services->searchFilterFactory(),
93 $this->search_services->searchClauseFactory(),
94 $this->paths_services->pathFactory(),
95 $this->identifiersHandler()
96 );
97 }
98}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
__construct(GlobalContainer $dic, SearchServices $repository_services, PathsServices $paths_services,)
Definition: Services.php:47