APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

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

Next Steps

Previous

Configuration & Runtime

Explore Configuration & Runtime

Next

Env

Explore Env