ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
Services.php
Go to the documentation of this file.
1 <?php namespace ILIAS\GlobalScreen;
2 
11 
17 class Services
18 {
19  use SingletonTrait;
23  private static $instance = null;
31  public $resource_version = '';
32 
39  {
40  $this->provider_factory = $provider_factory;
41  $this->resource_version = $resource_version;
42  }
43 
44 
50  public function mainBar() : MainMenuItemFactory
51  {
52  return $this->get(MainMenuItemFactory::class);
53  }
54 
55 
59  public function metaBar() : MetaBarItemFactory
60  {
61  return $this->get(MetaBarItemFactory::class);
62  }
63 
64 
69  public function tool() : ToolServices
70  {
71  return $this->get(ToolServices::class);
72  }
73 
74 
78  public function layout() : LayoutServices
79  {
80  return $this->getWithArgument(LayoutServices::class, $this->resource_version);
81  }
82 
83 
87  public function notifications() : NotificationServices
88  {
89  return $this->get(NotificationServices::class);
90  }
91 
92 
96  public function collector() : CollectorFactory
97  {
98  return $this->getWithArgument(CollectorFactory::class, $this->provider_factory);
99  }
100 
101 
108  {
109  return $this->getWithArgument(IdentificationFactory::class, $this->provider_factory);
110  }
111 }
trait SingletonTrait
Class SingletonTrait.
__construct(ProviderFactory $provider_factory, string $resource_version='')
Services constructor.
Definition: Services.php:38
getWithArgument(string $class_name, $argument)
Class ilAsqQuestionAuthoringFactory.