ILIAS  release_7 Revision v7.30-3-g800a261c036
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
 PhpIncompatibleReturnTypeInspection
 
 Helper
 
 Identification
 
 MainMenu
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Provider
 
 Scope
 
 ScreenContext
 

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

Function Documentation

◆ get()

ILIAS\GlobalScreen\get ( string  $class_name)
private

Definition at line 35 of file SingletonTrait.php.

References ILIAS\GlobalScreen\has().

Referenced by Parser\closeList(), Parser\createAssocArgs(), Parser\fetchScaryTemplateMaybeFromCache(), ilOrgUnitPosition\get(), ilDate\get(), arFieldCache\getPrimaryFieldName(), arFieldCache\getPrimaryFieldType(), ilTemplate\getUnmodified(), Title\moveToNewTitle(), Title\newFromRedirect(), ActiveRecord\preloadObjects(), and ilOrgUnitMultiLineInputGUI\render().

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

◆ getWithArgument()

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

Definition at line 44 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(), and ILIAS\GlobalScreen\Collector\CollectorFactory\notifications().

44  : object
45  {
46  if (!$this->has($class_name)) {
47  self::$services[$class_name] = new $class_name($argument);
48  }
49 
50  return self::$services[$class_name];
51  }
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 53 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().

53  : object
54  {
55  if (!$this->has($class_name)) {
56  $i = new ReflectionClass($class_name);
57 
58  self::$services[$class_name] = $i->newInstanceArgs($arguments);
59  }
60 
61  return self::$services[$class_name];
62  }
has(string $class_name)
$i
Definition: metadata.php:24
+ 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 $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.