ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\LegalDocuments\ConsumerToolbox\SelectSetting Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\ConsumerToolbox\SelectSetting:

Public Member Functions

 __construct (private readonly KeyValueStore $store, private readonly Marshal $marshal)
 
 typed (string $name, Closure $convert_with)
 

Detailed Description

Definition at line 25 of file SelectSetting.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\ConsumerToolbox\SelectSetting::__construct ( private readonly KeyValueStore  $store,
private readonly Marshal  $marshal 
)

Definition at line 27 of file SelectSetting.php.

30  {
31  }

Member Function Documentation

◆ typed()

ILIAS\LegalDocuments\ConsumerToolbox\SelectSetting::typed ( string  $name,
Closure  $convert_with 
)
Parameters
Closure(Marshal)Convert $convert_with

Definition at line 36 of file SelectSetting.php.

36  : Setting
37  {
38  $convert = $convert_with($this->marshal);
39 
40  return new Setting(
41  fn() => $convert->fromString()->transform($this->store->value($name)),
42  fn($value) => $this->store->update($name, $convert->toString()->transform($value))
43  );
44  }

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