ParameterRuntime attribute
The \Kaspi\DiContainer\Attributes\ParameterRuntime attribute will inject a dependency from a runtime container parameter[1].
Attribute configuration:
\Attribute::TARGET_PARAMETER\Attribute::IS_REPEATABLE
Attribute signature:
php
\Kaspi\DiContainer\Attributes\ParameterRuntime::__construct(
string $name = '',
?string $message = null
)Parameters:
$name– the name of a container parameter.$message– an optional message to provide if the container parameter does not yet have a value.
TIP
More information can be found in the Runtime container parameters section.
A "runtime" parameter acquires its actual value outside the container; this value is assigned after the container has been built. Such a parameter is intended for the proper configuration of container definitions that depend on it. ↩︎