Skip to content

Helper function diParameter() ​

The helper function diParameter() injects a dependency from the container's parameters[1].

Function signature:

php
use \Kaspi\DiContainer\Interfaces\DiDefinition\DiDefinitionNoArgumentsInterface;

\Kaspi\DiContainer\diParameter(
    string $name = ''
): DiDefinitionNoArgumentsInterface

Parameters:

  • $name – container parameter name.

NOTE

Read the section of the documentation dedicated to container parameters.


  1. A container parameter is a simple scalar type that can be reused to specify how a dependency should be injected. ↩︎