ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
Services.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
22 namespace ILIAS\GlobalScreen;
23 
33 
38 class Services
39 {
40  use SingletonTrait;
41 
45  private static $instance;
46 
51 
55  public $resource_version = '';
56 
62  public function __construct(
64  string $resource_version = ''
65  ) {
66  global $DIC;
67  $this->provider_factory = $provider_factory;
68  $this->resource_version = urlencode($resource_version);
69  }
70 
75  public function mainBar() : MainMenuItemFactory
76  {
77  return $this->get(MainMenuItemFactory::class);
78  }
79 
83  public function metaBar() : MetaBarItemFactory
84  {
85  return $this->get(MetaBarItemFactory::class);
86  }
87 
92  public function tool() : ToolServices
93  {
94  return $this->get(ToolServices::class);
95  }
96 
100  public function layout() : LayoutServices
101  {
102  return $this->getWithArgument(LayoutServices::class, $this->resource_version);
103  }
104 
109  {
110  return $this->get(NotificationServices::class);
111  }
112 
116  public function collector() : CollectorFactory
117  {
118  return $this->getWithArgument(CollectorFactory::class, $this->provider_factory);
119  }
120 
126  {
127  return $this->getWithArgument(IdentificationFactory::class, $this->provider_factory);
128  }
129 }
PhpIncompatibleReturnTypeInspection
Class MetaBarItemFactory This factory provides you all available types for MainMenu GlobalScreen Item...
Class MainMenuItemFactory This factory provides you all available types for MainMenu GlobalScreen Ite...
trait SingletonTrait
Class SingletonTrait.
global $DIC
Definition: goto.php:24
__construct(ProviderFactory $provider_factory, string $resource_version='')
Services constructor.
Definition: Services.php:62
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...
getWithArgument(string $class_name, $argument)
Class ilAsqQuestionAuthoringFactory.