Bristol SU Support Package
src
ModuleInstance
Settings
ModuleSettingsStore.php
Go to the documentation of this file.
1
<?php
2
3
namespace
BristolSU\Support\ModuleInstance\Settings
;
4
5
use
BristolSU\Support\ModuleInstance\Contracts\Settings\ModuleSettingsStore
as
ModuleSettingsStoreContract
;
6
use
FormSchema\Schema\Form
;
7
11
class
ModuleSettingsStore
implements
ModuleSettingsStoreContract
12
{
13
21
private
$settings
= [];
22
30
public
function
register
(
string
$alias, Form
$settings
)
31
{
32
$this->
settings
[$alias] =
$settings
;
33
}
34
43
public
function
get
(
string
$alias): Form
44
{
45
if
(array_key_exists($alias, $this->
settings
)) {
46
return
$this->
settings
[$alias];
47
}
48
throw
new \Exception(sprintf(
'Settings not found for alias %s'
, $alias));
49
}
50
}
Form
function\settings
settings()
BristolSU\Support\ModuleInstance\Settings\ModuleSettingsStore\$settings
$settings
Definition:
ModuleSettingsStore.php:21
ModuleSettingsStore
BristolSU\Support\ModuleInstance\Settings
Definition:
ModuleInstanceSetting.php:3
BristolSU\Support\ModuleInstance\Settings\ModuleSettingsStore
Definition:
ModuleSettingsStore.php:11
Generated by
1.8.13