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

Namespaces

namespace  Client
 Entry Point for Async calls from the Notification Center.
 
namespace  Collector
 
namespace  Helper
 
namespace  Identification
 
namespace  MainMenu
 
namespace  Provider
 
namespace  Scope
 
namespace  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.

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)

References ILIAS\GlobalScreen\has().

Referenced by ilDate\get(), ilTemplate\get(), ilOrgUnitPosition\get(), ilTemplate\getUnmodified(), Title\moveToNewTitle(), Title\newFromRedirect(), ActiveRecord\preloadObjects(), and ilOrgUnitMultiLineInputGUI\render().

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

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 }

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

+ 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

ReflectionException

Definition at line 54 of file SingletonTrait.php.

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 }
$i
Definition: metadata.php:24

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

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

+ 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 8 of file SingletonTrait.php.