Services
Settings
v1.0.0Default SettingsInterface implementation. Stores values in the Hub's meteorack_settings table with module-scoped keys.
Methods
public function get(string $key, mixed $default = null): mixedRetrieve a setting with JSON decode support.
public function set(string $key, mixed $value): voidPersist a setting with automatic JSON encode for complex values.
Example
settings.php
// Declared in module.json:
// "services": ["settings"]
// Injected automatically:
public function __construct(
private readonly SettingsInterface $settings,
) {}