trait ArgumentTrait
Hierarchy
- trait \Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ArgumentTrait
File
-
vendor/
symfony/ dependency-injection/ Loader/ Configurator/ Traits/ ArgumentTrait.php, line 14
Namespace
Symfony\Component\DependencyInjection\Loader\Configurator\TraitsView source
trait ArgumentTrait {
/**
* Sets the arguments to pass to the service constructor/factory method.
*
* @return $this
*/
public final function args(array $arguments) : static {
$this->definition
->setArguments(static::processValue($arguments, true));
return $this;
}
/**
* Sets one argument to pass to the service constructor/factory method.
*
* @return $this
*/
public final function arg(string|int $key, mixed $value) : static {
$this->definition
->setArgument($key, static::processValue($value, true));
return $this;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ArgumentTrait::arg | final public | function | Sets one argument to pass to the service constructor/factory method. |
ArgumentTrait::args | final public | function | Sets the arguments to pass to the service constructor/factory method. |