/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/DependencyInjection/Attribute/Autoconfigure.php
51 строка
3 KB
Santiago San Martin
[DependencyInjection] add `factory` argument in the `#[Autoconfigure]` attribute
12 авг 2026, 18:30
12 авг 2026, 18:30
83b3b89
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Attribute; /** * An attribute to tell how a base type should be autoconfigured. * * @author Nicolas Grekas <p@tchwork.com> */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] class Autoconfigure { /** * @param array<array<mixed>>|string[]|null $tags The tags to add to the service; a tag's attributes may be a \Closure or a [class-string, method] callable that computes them from each tagged service's class-string * @param array<array<mixed>>|null $calls The calls to be made when instantiating the service * @param array<string, mixed>|null $bind The bindings to declare for the service * @param bool|string|null $lazy Whether the service is lazy-loaded * @param bool|null $public Whether to declare the service as public * @param bool|null $shared Whether to declare the service as shared * @param bool|null $autowire Whether to declare the service as autowired * @param array<string, mixed>|null $properties The properties to define when creating the service * @param array{string, string}|string|null $configurator A PHP function, reference or an array containing a class/reference and a method to call after the service is fully initialized * @param string|null $constructor The public static method to use to instantiate the service * @param array<array<mixed>>|string[]|null $resourceTags The resource tags to add to the service * @param array{string|null, string}|string|null $factory A reference, an expression, or an array containing a class/reference and a method to call to create the service */ public function __construct( public ?array $tags = null, public ?array $calls = null, public ?array $bind = null, public bool|string|null $lazy = null, public ?bool $public = null, public ?bool $shared = null, public ?bool $autowire = null, public ?array $properties = null, public array|string|null $configurator = null, public ?string $constructor = null, public ?array $resourceTags = null, public array|string|null $factory = null, ) { } }