Config
Runtime and configuration value injection.
Purpose & processing
Calls the corresponding getter on the Registry-resolved Core\Config controller; a key such as siteName resolves to getSiteName().
Parameters
| Parameter | Type | Default | Behavior |
|---|---|---|---|
| key | string | Required | Key used to resolve the value. |
Example
#[Config('siteName')]
protected string|null $siteName = null;
Behavior and considerations
- If the getter does not exist, null is injected.
- This is not a direct lookup in a configuration file or array.
Source
shared/src/Core/Annotation/Config.php