Bristol SU Support Package
ModuleSettingsStore.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
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 }