Skip to content
docsv0.17.0

EnvVar

One environment variable a service reads, and where its value comes from. A plugin can say the value outright (`value`), point at the app config key that holds it (`configKey` — the app owns it, the projection reads it), or mark it secret: a secret is never shown and never inlined; it is projected as `${NAME}` so the operator supplies it out of band. When both a literal and a config key are given, the app's config wins and the literal is the fallback. A secret NEVER carries a literal value: a declaration that says «secret» and hands the value over in code is lying, and the contract refuses it here rather than trusting every reader to mask it downstream.

EnvVar::__construct()

public function __construct(string $name, ?string $value = null, ?string $configKey = null, bool $secret = false):

Parameters

Parameters of __construct()
NameTypeDescription
$namestringthe variable as the container reads it (`^[A-Z][A-Z0-9_]*$`)
$value(string | null)a literal value, when the plugin can say it
$configKey(string | null)the dotted app config key the value lives under, when the app owns it
$secretboolnever shown, never inlined — projected as `${NAME}`