ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\GlobalScreen Namespace Reference

@noinspection PhpIncompatibleReturnTypeInspection More...

Namespaces

namespace  Client
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  Collector
 @noinspection PhpIncompatibleReturnTypeInspection
 
namespace  Helper
 
namespace  Identification
 
namespace  MainMenu
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  Provider
 
namespace  Scope
 
namespace  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

@noinspection PhpIncompatibleReturnTypeInspection

Function Documentation

◆ get()

ILIAS\GlobalScreen\get ( string  $class_name)
private

Definition at line 35 of file SingletonTrait.php.

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)

References ILIAS\GlobalScreen\has().

Referenced by ilDate\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

Definition at line 44 of file SingletonTrait.php.

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 }

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

Definition at line 53 of file SingletonTrait.php.

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 }
$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 28 of file SingletonTrait.php.