DI\Definition\Helper\ObjectDefinitionHelper::constructorParameter PHP Method

constructorParameter() public method

This method is usually used together with annotations or autowiring, when a parameter is not (or cannot be) type-hinted. Using this method instead of constructor() allows to avoid defining all the parameters (letting them being resolved using annotations or autowiring) and only define one.
public constructorParameter ( string $parameter, mixed $value ) : ObjectDefinitionHelper
$parameter string Parameter for which the value will be given.
$value mixed Value to give to this parameter.
return ObjectDefinitionHelper
    public function constructorParameter($parameter, $value)
    {
        $this->constructor[$parameter] = $value;
        return $this;
    }