ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\GlobalScreen Namespace Reference

PhpIncompatibleReturnTypeInspection More...

Namespaces

 Client
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Collector
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Helper
 
 Identification
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 MainMenu
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Provider
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Scope
 
 ScreenContext
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 

Data Structures

interface  isGlobalScreenItem
 Interface isGlobalScreenItem. More...
 
class  Services
 Class Services. More...
 

Functions

 get (string $class_name)
 
 getWithArgument (string $class_name, $argument)
 
 getWithMultipleArguments (string $class_name, array $arguments)
 
 has (string $class_name)
 

Variables

trait SingletonTrait
 Class SingletonTrait. More...
 

Detailed Description

PhpIncompatibleReturnTypeInspection

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Function Documentation

◆ get()

ILIAS\GlobalScreen\get ( string  $class_name)
private

Definition at line 32 of file SingletonTrait.php.

References ILIAS\GlobalScreen\has().

32  : object
33  {
34  if (!$this->has($class_name)) {
35  self::$services[$class_name] = new $class_name();
36  }
37 
38  return self::$services[$class_name];
39  }
has(string $class_name)
+ Here is the call graph for this function:

◆ getWithArgument()

ILIAS\GlobalScreen\getWithArgument ( string  $class_name,
  $argument 
)
private

Definition at line 41 of file SingletonTrait.php.

References ILIAS\GlobalScreen\has().

Referenced by ILIAS\GlobalScreen\Services\collector(), ILIAS\GlobalScreen\Services\identification(), ILIAS\GlobalScreen\Services\layout(), ILIAS\GlobalScreen\Collector\CollectorFactory\metaBar(), ILIAS\GlobalScreen\Collector\CollectorFactory\notifications(), and ILIAS\GlobalScreen\Collector\CollectorFactory\toasts().

41  : object
42  {
43  if (!$this->has($class_name)) {
44  self::$services[$class_name] = new $class_name($argument);
45  }
46 
47  return self::$services[$class_name];
48  }
has(string $class_name)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWithMultipleArguments()

ILIAS\GlobalScreen\getWithMultipleArguments ( string  $class_name,
array  $arguments 
)
private

Definition at line 50 of file SingletonTrait.php.

References $i, and ILIAS\GlobalScreen\has().

Referenced by ILIAS\GlobalScreen\Collector\CollectorFactory\layout(), ILIAS\GlobalScreen\Collector\CollectorFactory\mainmenu(), and ILIAS\GlobalScreen\Collector\CollectorFactory\tool().

50  : object
51  {
52  if (!$this->has($class_name)) {
53  $i = new ReflectionClass($class_name);
54 
55  self::$services[$class_name] = $i->newInstanceArgs($arguments);
56  }
57 
58  return self::$services[$class_name];
59  }
has(string $class_name)
$i
Definition: metadata.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has()

Variable Documentation

◆ SingletonTrait

trait ILIAS::GlobalScreen\SingletonTrait
Initial value:
{
private static array $services = []

Class SingletonTrait.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 29 of file SingletonTrait.php.