ILIAS  release_8 Revision v8.24
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
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  Helper
 
namespace  Identification
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  MainMenu
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  Provider
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  Scope
 
namespace  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

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

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)

References ILIAS\GlobalScreen\has().

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

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 }

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

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

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

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