Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AutowireInline.php

function AutowireInline::__construct

Overrides Autowire::__construct

1 method overrides AutowireInline::__construct()
AutowireCallable::__construct in vendor/symfony/dependency-injection/Attribute/AutowireCallable.php

File

vendor/symfony/dependency-injection/Attribute/AutowireInline.php, line 32

Class

AutowireInline
Allows inline service definition for an argument.

Namespace

Symfony\Component\DependencyInjection\Attribute

Code

public function __construct(string|array|null $class = null, array $arguments = [], array $calls = [], array $properties = [], ?string $parent = null, bool|string $lazy = false) {
    if (null === $class && null === $parent) {
        throw new LogicException('#[AutowireInline] attribute should declare either $class or $parent.');
    }
    parent::__construct([
        \is_array($class) ? 'factory' : 'class' => $class,
        'arguments' => $arguments,
        'calls' => $calls,
        'properties' => $properties,
        'parent' => $parent,
    ], lazy: $lazy);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal