ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Services.php
Go to the documentation of this file.
1 <?php namespace ILIAS\GlobalScreen;
2 
7 
13 class Services
14 {
15  use SingletonTrait;
19  private static $instance = null;
24 
25 
32  {
33  $this->provider_factory = $provider_factory;
34  }
35 
36 
43  {
44  if (!isset(self::$instance)) {
45  self::$instance = new self($provider_factory);
46  }
47 
48  return self::$instance;
49  }
50 
51 
57  public function mainmenu() : MainMenuItemFactory
58  {
59  return $this->get(MainMenuItemFactory::class);
60  }
61 
62 
66  public function collector() : CollectorFactory
67  {
68  return $this->getWithArgument(CollectorFactory::class, $this->provider_factory);
69  }
70 
71 
78  {
79  return $this->getWithArgument(IdentificationFactory::class, $this->provider_factory);
80  }
81 }
__construct(ProviderFactoryInterface $provider_factory)
Services constructor.
Definition: Services.php:31
trait SingletonTrait
Class SingletonTrait.
static getInstance(ProviderFactoryInterface $provider_factory)
Definition: Services.php:42
getWithArgument(string $class_name, $argument)
Class ilCertificateAppEventListener.