ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
Services.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 
29 class Services
30 {
33 
34  protected GlobalContainer $dic;
35 
36  public function __construct(
37  GlobalContainer $dic,
38  ) {
39  $this->dic = $dic;
40  }
41 
42  public function repository(): RepositoryInterface
43  {
44  if (isset($this->repository)) {
45  return $this->repository;
46  }
47  return $this->repository = new DatabaseRepository(
48  $this->dic->database()
49  );
50  }
51 
52  public function renderer(): RendererInterface
53  {
54  if (isset($this->renderer)) {
55  return $this->renderer;
56  }
57  return $this->renderer = new Renderer(
58  $this->dic->ui()->factory(),
59  $this->dic->resourceStorage()
60  );
61  }
62 }
__construct(GlobalContainer $dic,)
Definition: Services.php:36