ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ILIAS\GlobalScreen Namespace Reference

Namespaces

 Client
 Entry Point for Async calls from the Notification Center.
 
 Collector
 
 Helper
 
 Identification
 
 MainMenu
 
 Provider
 
 Scope
 
 ScreenContext
 

Data Structures

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...
 

Function Documentation

◆ get()

ILIAS\GlobalScreen\get ( string  $class_name)
private
Parameters
string$class_name
Returns
mixed

Definition at line 22 of file SingletonTrait.php.

References ILIAS\GlobalScreen\has().

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

23  {
24  if (!$this->has($class_name)) {
25  self::$services[$class_name] = new $class_name();
26  }
27 
28  return self::$services[$class_name];
29  }
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
Parameters
string$class_name
Returns
mixed

Definition at line 37 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().

38  {
39  if (!$this->has($class_name)) {
40  self::$services[$class_name] = new $class_name($argument);
41  }
42 
43  return self::$services[$class_name];
44  }
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
Parameters
string$class_name
array$arguments
Returns
mixed
Exceptions

Definition at line 54 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().

55  {
56  if (!$this->has($class_name)) {
57  $i = new \ReflectionClass($class_name);
58 
59  self::$services[$class_name] = $i->newInstanceArgs($arguments);
60  }
61 
62  return self::$services[$class_name];
63  }
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 9 of file SingletonTrait.php.