Helper function diParameterRuntime()
The helper function diParameterRuntime() injects a dependency from the runtime container parameters[1].
Function signature:
php
use \Kaspi\DiContainer\Interfaces\DiDefinition\DiDefinitionNoArgumentsInterface;
\Kaspi\DiContainer\diParameterRuntime(
string $name = '',
?string $message = null
): DiDefinitionNoArgumentsInterfaceParameters:
$name– the name of the container parameter.$message– an optional message to provide if the container parameter does not yet have a value.
TIP
Read the Runtime "Container Parameters" section of the documentation.
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. ↩︎