38 lines
869 B
PHP
38 lines
869 B
PHP
<?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\Stamp;
|
|
|
|
use Symfony\Component\Messenger\Middleware\SendMessageMiddleware;
|
|
|
|
/**
|
|
* Marker stamp for a received message.
|
|
*
|
|
* This is mainly used by the `SendMessageMiddleware` middleware to identify
|
|
* a message should not be sent if it was just received.
|
|
*
|
|
* @see SendMessageMiddleware
|
|
*
|
|
* @author Samuel Roze <samuel.roze@gmail.com>
|
|
*/
|
|
final class ReceivedStamp implements NonSendableStampInterface
|
|
{
|
|
public function __construct(
|
|
private string $transportName,
|
|
) {
|
|
}
|
|
|
|
public function getTransportName(): string
|
|
{
|
|
return $this->transportName;
|
|
}
|
|
}
|