ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Setup\ConfigCollection Class Reference

A collection of some configurations. More...

+ Inheritance diagram for ILIAS\Setup\ConfigCollection:
+ Collaboration diagram for ILIAS\Setup\ConfigCollection:

Public Member Functions

 __construct (array $configs)
 
 getConfig (string $key)
 
 maybeGetConfig (string $key)
 
 getKeys ()
 

Protected Attributes

array $configs
 

Detailed Description

A collection of some configurations.

Definition at line 26 of file ConfigCollection.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\ConfigCollection::__construct ( array  $configs)

Definition at line 33 of file ConfigCollection.php.

References ILIAS\Setup\ConfigCollection\$configs.

34  {
35  $this->configs = $configs;
36  }

Member Function Documentation

◆ getConfig()

ILIAS\Setup\ConfigCollection::getConfig ( string  $key)

Definition at line 38 of file ConfigCollection.php.

References ILIAS\LTI\ToolProvider\$key.

38  : Config
39  {
40  if (!isset($this->configs[$key])) {
41  throw new \InvalidArgumentException(
42  "Unknown key '$key' for Config."
43  );
44  }
45  return $this->configs[$key];
46  }
string $key
Consumer key/client ID value.
Definition: System.php:193

◆ getKeys()

ILIAS\Setup\ConfigCollection::getKeys ( )
Returns
string[]

Definition at line 56 of file ConfigCollection.php.

56  : array
57  {
58  return array_keys($this->configs);
59  }

◆ maybeGetConfig()

ILIAS\Setup\ConfigCollection::maybeGetConfig ( string  $key)

Definition at line 48 of file ConfigCollection.php.

References ILIAS\LTI\ToolProvider\$key.

48  : ?Config
49  {
50  return $this->configs[$key] ?? null;
51  }
string $key
Consumer key/client ID value.
Definition: System.php:193

Field Documentation

◆ $configs

array ILIAS\Setup\ConfigCollection::$configs
protected

Definition at line 31 of file ConfigCollection.php.

Referenced by ILIAS\Setup\ConfigCollection\__construct().


The documentation for this class was generated from the following file: