/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Messenger/Attribute/AsMessageHandler.php
54 строки
1 KB
Nicolas Grekas
[Messenger] Support signing messages per handler
01 ноя 2025, 16:37
01 ноя 2025, 16:37
21c5ac5
Код
Авторство
О чём код?
<?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\Messenger\Attribute; /** * Service tag to autoconfigure message handlers. * * @author Alireza Mirsepassi <alirezamirsepassi@gmail.com> */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class AsMessageHandler { public function __construct( /** * Name of the bus from which this handler can receive messages, by default all buses. */ public ?string $bus = null, /** * Name of the transport from which this handler can receive messages, by default all transports. */ public ?string $fromTransport = null, /** * Type of messages (FQCN) that can be processed by the handler, only needed if can't be guessed by type-hint. */ public ?string $handles = null, /** * Name of the method that will process the message, only if the target is a class. */ public ?string $method = null, /** * Priority of this handler when multiple handlers can process the same message. */ public int $priority = 0, /** * Whether messages should be signed when sent on a transport. */ public bool $sign = false, ) { } }