class AutowireServiceClosure
Attribute to wrap a service in a closure that returns it.
Hierarchy
- class \Symfony\Component\DependencyInjection\Attribute\Autowire
- class \Symfony\Component\DependencyInjection\Attribute\AutowireServiceClosure extends \Symfony\Component\DependencyInjection\Attribute\Autowire
Expanded class hierarchy of AutowireServiceClosure
3 files declare their use of AutowireServiceClosure
- AjaxResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AjaxResponseSubscriber.php - RedirectResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ RedirectResponseSubscriber.php - Session.php in core/
lib/ Drupal/ Core/ StackMiddleware/ Session.php
File
-
vendor/
symfony/ dependency-injection/ Attribute/ AutowireServiceClosure.php, line 20
Namespace
Symfony\Component\DependencyInjection\AttributeView source
class AutowireServiceClosure extends Autowire {
/**
* @param string $service The service id to wrap in the closure
*/
public function __construct(string $service) {
parent::__construct(new ServiceClosureArgument(new Reference($service)));
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
Autowire::$lazy | public | property | ||
Autowire::$value | public | property | ||
AutowireServiceClosure::__construct | public | function | Overrides Autowire::__construct |