Attribute to tell a parameter how to be autowired.

CloneableInstantiable
Properties
public readonly array|bool $lazy
public readonly Symfony\Component\ExpressionLanguage\Expression|Symfony\Component\DependencyInjection\Reference|Symfony\Component\DependencyInjection\Argument\ArgumentInterface|array|string|?null $value
Methods
public __construct(Symfony\Component\DependencyInjection\Argument\ArgumentInterface|array|string|?null $value = NULL, ?string $service = NULL, ?string $expression = NULL, ?string $env = NULL, ?string $param = NULL, array|string|bool $lazy = false)
 

Use only ONE of the following.

  • param string|array|\ArgumentInterface|null $value Value to inject (ie "%kernel.project_dir%/some/path")
  • param string|null $service Service ID (ie "some.service")
  • param string|null $expression Expression (ie 'service("some.service").someMethod()')
  • param string|null $env Environment variable name (ie 'SOME_ENV_VARIABLE')
  • param string|null $param Parameter name (ie 'some.parameter.name')
  • param bool|class-string|class-string[] $lazy Whether to use lazy-loading for this argument
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration