update
This commit is contained in:
33
projects/priceservice/vendor/symfony/messenger/Stamp/AckStamp.php
vendored
Normal file
33
projects/priceservice/vendor/symfony/messenger/Stamp/AckStamp.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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\Envelope;
|
||||
|
||||
/**
|
||||
* Marker stamp for messages that can be ack/nack'ed.
|
||||
*/
|
||||
final class AckStamp implements NonSendableStampInterface
|
||||
{
|
||||
/**
|
||||
* @param \Closure(Envelope, \Throwable|null) $ack
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly \Closure $ack,
|
||||
) {
|
||||
}
|
||||
|
||||
public function ack(Envelope $envelope, ?\Throwable $e = null): void
|
||||
{
|
||||
($this->ack)($envelope, $e);
|
||||
}
|
||||
}
|
||||
32
projects/priceservice/vendor/symfony/messenger/Stamp/BusNameStamp.php
vendored
Normal file
32
projects/priceservice/vendor/symfony/messenger/Stamp/BusNameStamp.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Stamp used to identify which bus it was passed to.
|
||||
*
|
||||
* @author Ryan Weaver <ryan@symfonycasts.com>
|
||||
*/
|
||||
final class BusNameStamp implements StampInterface
|
||||
{
|
||||
private string $busName;
|
||||
|
||||
public function __construct(string $busName)
|
||||
{
|
||||
$this->busName = $busName;
|
||||
}
|
||||
|
||||
public function getBusName(): string
|
||||
{
|
||||
return $this->busName;
|
||||
}
|
||||
}
|
||||
19
projects/priceservice/vendor/symfony/messenger/Stamp/ConsumedByWorkerStamp.php
vendored
Normal file
19
projects/priceservice/vendor/symfony/messenger/Stamp/ConsumedByWorkerStamp.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* A marker that this message was consumed by a worker process.
|
||||
*/
|
||||
class ConsumedByWorkerStamp implements NonSendableStampInterface
|
||||
{
|
||||
}
|
||||
46
projects/priceservice/vendor/symfony/messenger/Stamp/DelayStamp.php
vendored
Normal file
46
projects/priceservice/vendor/symfony/messenger/Stamp/DelayStamp.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Apply this stamp to delay delivery of your message on a transport.
|
||||
*/
|
||||
final class DelayStamp implements StampInterface
|
||||
{
|
||||
private int $delay;
|
||||
|
||||
/**
|
||||
* @param int $delay The delay in milliseconds
|
||||
*/
|
||||
public function __construct(int $delay)
|
||||
{
|
||||
$this->delay = $delay;
|
||||
}
|
||||
|
||||
public function getDelay(): int
|
||||
{
|
||||
return $this->delay;
|
||||
}
|
||||
|
||||
public static function delayFor(\DateInterval $interval): self
|
||||
{
|
||||
$now = new \DateTimeImmutable('now', new \DateTimeZone('UTC'));
|
||||
$end = $now->add($interval);
|
||||
|
||||
return new self(($end->getTimestamp() - $now->getTimestamp()) * 1000);
|
||||
}
|
||||
|
||||
public static function delayUntil(\DateTimeInterface $dateTime): self
|
||||
{
|
||||
return new self(($dateTime->getTimestamp() - time()) * 1000);
|
||||
}
|
||||
}
|
||||
23
projects/priceservice/vendor/symfony/messenger/Stamp/DispatchAfterCurrentBusStamp.php
vendored
Normal file
23
projects/priceservice/vendor/symfony/messenger/Stamp/DispatchAfterCurrentBusStamp.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Marker item to tell this message should be handled in after the current bus has finished.
|
||||
*
|
||||
* @see \Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware
|
||||
*
|
||||
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||
*/
|
||||
final class DispatchAfterCurrentBusStamp implements NonSendableStampInterface
|
||||
{
|
||||
}
|
||||
85
projects/priceservice/vendor/symfony/messenger/Stamp/ErrorDetailsStamp.php
vendored
Normal file
85
projects/priceservice/vendor/symfony/messenger/Stamp/ErrorDetailsStamp.php
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
<?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\ErrorHandler\Exception\FlattenException;
|
||||
use Symfony\Component\Messenger\Exception\HandlerFailedException;
|
||||
|
||||
/**
|
||||
* Stamp applied when a messages fails due to an exception in the handler.
|
||||
*/
|
||||
final class ErrorDetailsStamp implements StampInterface
|
||||
{
|
||||
private string $exceptionClass;
|
||||
private int|string $exceptionCode;
|
||||
private string $exceptionMessage;
|
||||
private ?FlattenException $flattenException;
|
||||
|
||||
public function __construct(string $exceptionClass, int|string $exceptionCode, string $exceptionMessage, ?FlattenException $flattenException = null)
|
||||
{
|
||||
$this->exceptionClass = $exceptionClass;
|
||||
$this->exceptionCode = $exceptionCode;
|
||||
$this->exceptionMessage = $exceptionMessage;
|
||||
$this->flattenException = $flattenException;
|
||||
}
|
||||
|
||||
public static function create(\Throwable $throwable): self
|
||||
{
|
||||
if ($throwable instanceof HandlerFailedException) {
|
||||
$throwable = $throwable->getPrevious();
|
||||
}
|
||||
|
||||
$flattenException = null;
|
||||
if (class_exists(FlattenException::class)) {
|
||||
$flattenException = FlattenException::createFromThrowable($throwable);
|
||||
}
|
||||
|
||||
return new self($throwable::class, $throwable->getCode(), $throwable->getMessage(), $flattenException);
|
||||
}
|
||||
|
||||
public function getExceptionClass(): string
|
||||
{
|
||||
return $this->exceptionClass;
|
||||
}
|
||||
|
||||
public function getExceptionCode(): int|string
|
||||
{
|
||||
return $this->exceptionCode;
|
||||
}
|
||||
|
||||
public function getExceptionMessage(): string
|
||||
{
|
||||
return $this->exceptionMessage;
|
||||
}
|
||||
|
||||
public function getFlattenException(): ?FlattenException
|
||||
{
|
||||
return $this->flattenException;
|
||||
}
|
||||
|
||||
public function equals(?self $that): bool
|
||||
{
|
||||
if (null === $that) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->flattenException && $that->flattenException) {
|
||||
return $this->flattenException->getClass() === $that->flattenException->getClass()
|
||||
&& $this->flattenException->getCode() === $that->flattenException->getCode()
|
||||
&& $this->flattenException->getMessage() === $that->flattenException->getMessage();
|
||||
}
|
||||
|
||||
return $this->exceptionClass === $that->exceptionClass
|
||||
&& $this->exceptionCode === $that->exceptionCode
|
||||
&& $this->exceptionMessage === $that->exceptionMessage;
|
||||
}
|
||||
}
|
||||
30
projects/priceservice/vendor/symfony/messenger/Stamp/FlushBatchHandlersStamp.php
vendored
Normal file
30
projects/priceservice/vendor/symfony/messenger/Stamp/FlushBatchHandlersStamp.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Marker telling that any batch handlers bound to the envelope should be flushed.
|
||||
*/
|
||||
final class FlushBatchHandlersStamp implements NonSendableStampInterface
|
||||
{
|
||||
private bool $force;
|
||||
|
||||
public function __construct(bool $force)
|
||||
{
|
||||
$this->force = $force;
|
||||
}
|
||||
|
||||
public function force(): bool
|
||||
{
|
||||
return $this->force;
|
||||
}
|
||||
}
|
||||
53
projects/priceservice/vendor/symfony/messenger/Stamp/HandledStamp.php
vendored
Normal file
53
projects/priceservice/vendor/symfony/messenger/Stamp/HandledStamp.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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\Handler\HandlerDescriptor;
|
||||
|
||||
/**
|
||||
* Stamp identifying a message handled by the `HandleMessageMiddleware` middleware
|
||||
* and storing the handler returned value.
|
||||
*
|
||||
* This is used by synchronous command buses expecting a return value and the retry logic
|
||||
* to only execute handlers that didn't succeed.
|
||||
*
|
||||
* @see \Symfony\Component\Messenger\Middleware\HandleMessageMiddleware
|
||||
* @see \Symfony\Component\Messenger\HandleTrait
|
||||
*
|
||||
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
|
||||
*/
|
||||
final class HandledStamp implements StampInterface
|
||||
{
|
||||
private mixed $result;
|
||||
private string $handlerName;
|
||||
|
||||
public function __construct(mixed $result, string $handlerName)
|
||||
{
|
||||
$this->result = $result;
|
||||
$this->handlerName = $handlerName;
|
||||
}
|
||||
|
||||
public static function fromDescriptor(HandlerDescriptor $handler, mixed $result): self
|
||||
{
|
||||
return new self($result, $handler->getName());
|
||||
}
|
||||
|
||||
public function getResult(): mixed
|
||||
{
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
public function getHandlerName(): string
|
||||
{
|
||||
return $this->handlerName;
|
||||
}
|
||||
}
|
||||
31
projects/priceservice/vendor/symfony/messenger/Stamp/HandlerArgumentsStamp.php
vendored
Normal file
31
projects/priceservice/vendor/symfony/messenger/Stamp/HandlerArgumentsStamp.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* @author Jáchym Toušek <enumag@gmail.com>
|
||||
*/
|
||||
final class HandlerArgumentsStamp implements NonSendableStampInterface
|
||||
{
|
||||
public function __construct(
|
||||
private array $additionalArguments,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getAdditionalArguments()
|
||||
{
|
||||
return $this->additionalArguments;
|
||||
}
|
||||
}
|
||||
19
projects/priceservice/vendor/symfony/messenger/Stamp/MessageDecodingFailedStamp.php
vendored
Normal file
19
projects/priceservice/vendor/symfony/messenger/Stamp/MessageDecodingFailedStamp.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||
*/
|
||||
class MessageDecodingFailedStamp implements StampInterface
|
||||
{
|
||||
}
|
||||
32
projects/priceservice/vendor/symfony/messenger/Stamp/NoAutoAckStamp.php
vendored
Normal file
32
projects/priceservice/vendor/symfony/messenger/Stamp/NoAutoAckStamp.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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\Handler\HandlerDescriptor;
|
||||
|
||||
/**
|
||||
* Marker telling that ack should not be done automatically for this message.
|
||||
*/
|
||||
final class NoAutoAckStamp implements NonSendableStampInterface
|
||||
{
|
||||
private HandlerDescriptor $handlerDescriptor;
|
||||
|
||||
public function __construct(HandlerDescriptor $handlerDescriptor)
|
||||
{
|
||||
$this->handlerDescriptor = $handlerDescriptor;
|
||||
}
|
||||
|
||||
public function getHandlerDescriptor(): HandlerDescriptor
|
||||
{
|
||||
return $this->handlerDescriptor;
|
||||
}
|
||||
}
|
||||
21
projects/priceservice/vendor/symfony/messenger/Stamp/NonSendableStampInterface.php
vendored
Normal file
21
projects/priceservice/vendor/symfony/messenger/Stamp/NonSendableStampInterface.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* A stamp that should not be included with the Envelope if sent to a transport.
|
||||
*
|
||||
* @author Ryan Weaver <ryan@symfonycasts.com>
|
||||
*/
|
||||
interface NonSendableStampInterface extends StampInterface
|
||||
{
|
||||
}
|
||||
39
projects/priceservice/vendor/symfony/messenger/Stamp/ReceivedStamp.php
vendored
Normal file
39
projects/priceservice/vendor/symfony/messenger/Stamp/ReceivedStamp.php
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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
|
||||
{
|
||||
private string $transportName;
|
||||
|
||||
public function __construct(string $transportName)
|
||||
{
|
||||
$this->transportName = $transportName;
|
||||
}
|
||||
|
||||
public function getTransportName(): string
|
||||
{
|
||||
return $this->transportName;
|
||||
}
|
||||
}
|
||||
47
projects/priceservice/vendor/symfony/messenger/Stamp/RedeliveryStamp.php
vendored
Normal file
47
projects/priceservice/vendor/symfony/messenger/Stamp/RedeliveryStamp.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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\Envelope;
|
||||
|
||||
/**
|
||||
* Stamp applied when a messages needs to be redelivered.
|
||||
*/
|
||||
final class RedeliveryStamp implements StampInterface
|
||||
{
|
||||
private int $retryCount;
|
||||
private \DateTimeInterface $redeliveredAt;
|
||||
|
||||
public function __construct(int $retryCount, ?\DateTimeInterface $redeliveredAt = null)
|
||||
{
|
||||
$this->retryCount = $retryCount;
|
||||
$this->redeliveredAt = $redeliveredAt ?? new \DateTimeImmutable();
|
||||
}
|
||||
|
||||
public static function getRetryCountFromEnvelope(Envelope $envelope): int
|
||||
{
|
||||
/** @var self|null $retryMessageStamp */
|
||||
$retryMessageStamp = $envelope->last(self::class);
|
||||
|
||||
return $retryMessageStamp ? $retryMessageStamp->getRetryCount() : 0;
|
||||
}
|
||||
|
||||
public function getRetryCount(): int
|
||||
{
|
||||
return $this->retryCount;
|
||||
}
|
||||
|
||||
public function getRedeliveredAt(): \DateTimeInterface
|
||||
{
|
||||
return $this->redeliveredAt;
|
||||
}
|
||||
}
|
||||
79
projects/priceservice/vendor/symfony/messenger/Stamp/RouterContextStamp.php
vendored
Normal file
79
projects/priceservice/vendor/symfony/messenger/Stamp/RouterContextStamp.php
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* @author Jérémy Derussé <jeremy@derusse.com>
|
||||
*/
|
||||
class RouterContextStamp implements StampInterface
|
||||
{
|
||||
private string $baseUrl;
|
||||
private string $method;
|
||||
private string $host;
|
||||
private string $scheme;
|
||||
private int $httpPort;
|
||||
private int $httpsPort;
|
||||
private string $pathInfo;
|
||||
private string $queryString;
|
||||
|
||||
public function __construct(string $baseUrl, string $method, string $host, string $scheme, int $httpPort, int $httpsPort, string $pathInfo, string $queryString)
|
||||
{
|
||||
$this->baseUrl = $baseUrl;
|
||||
$this->method = $method;
|
||||
$this->host = $host;
|
||||
$this->scheme = $scheme;
|
||||
$this->httpPort = $httpPort;
|
||||
$this->httpsPort = $httpsPort;
|
||||
$this->pathInfo = $pathInfo;
|
||||
$this->queryString = $queryString;
|
||||
}
|
||||
|
||||
public function getBaseUrl(): string
|
||||
{
|
||||
return $this->baseUrl;
|
||||
}
|
||||
|
||||
public function getMethod(): string
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
public function getHost(): string
|
||||
{
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
public function getScheme(): string
|
||||
{
|
||||
return $this->scheme;
|
||||
}
|
||||
|
||||
public function getHttpPort(): int
|
||||
{
|
||||
return $this->httpPort;
|
||||
}
|
||||
|
||||
public function getHttpsPort(): int
|
||||
{
|
||||
return $this->httpsPort;
|
||||
}
|
||||
|
||||
public function getPathInfo(): string
|
||||
{
|
||||
return $this->pathInfo;
|
||||
}
|
||||
|
||||
public function getQueryString(): string
|
||||
{
|
||||
return $this->queryString;
|
||||
}
|
||||
}
|
||||
41
projects/priceservice/vendor/symfony/messenger/Stamp/SentStamp.php
vendored
Normal file
41
projects/priceservice/vendor/symfony/messenger/Stamp/SentStamp.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Marker stamp identifying a message sent by the `SendMessageMiddleware`.
|
||||
*
|
||||
* @see \Symfony\Component\Messenger\Middleware\SendMessageMiddleware
|
||||
*
|
||||
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
|
||||
*/
|
||||
final class SentStamp implements NonSendableStampInterface
|
||||
{
|
||||
private string $senderClass;
|
||||
private ?string $senderAlias;
|
||||
|
||||
public function __construct(string $senderClass, ?string $senderAlias = null)
|
||||
{
|
||||
$this->senderAlias = $senderAlias;
|
||||
$this->senderClass = $senderClass;
|
||||
}
|
||||
|
||||
public function getSenderClass(): string
|
||||
{
|
||||
return $this->senderClass;
|
||||
}
|
||||
|
||||
public function getSenderAlias(): ?string
|
||||
{
|
||||
return $this->senderAlias;
|
||||
}
|
||||
}
|
||||
32
projects/priceservice/vendor/symfony/messenger/Stamp/SentToFailureTransportStamp.php
vendored
Normal file
32
projects/priceservice/vendor/symfony/messenger/Stamp/SentToFailureTransportStamp.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Stamp applied when a message is sent to the failure transport.
|
||||
*
|
||||
* @author Ryan Weaver <ryan@symfonycasts.com>
|
||||
*/
|
||||
final class SentToFailureTransportStamp implements StampInterface
|
||||
{
|
||||
private string $originalReceiverName;
|
||||
|
||||
public function __construct(string $originalReceiverName)
|
||||
{
|
||||
$this->originalReceiverName = $originalReceiverName;
|
||||
}
|
||||
|
||||
public function getOriginalReceiverName(): string
|
||||
{
|
||||
return $this->originalReceiverName;
|
||||
}
|
||||
}
|
||||
24
projects/priceservice/vendor/symfony/messenger/Stamp/SerializedMessageStamp.php
vendored
Normal file
24
projects/priceservice/vendor/symfony/messenger/Stamp/SerializedMessageStamp.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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;
|
||||
|
||||
final class SerializedMessageStamp implements NonSendableStampInterface
|
||||
{
|
||||
public function __construct(private string $serializedMessage)
|
||||
{
|
||||
}
|
||||
|
||||
public function getSerializedMessage(): string
|
||||
{
|
||||
return $this->serializedMessage;
|
||||
}
|
||||
}
|
||||
30
projects/priceservice/vendor/symfony/messenger/Stamp/SerializerStamp.php
vendored
Normal file
30
projects/priceservice/vendor/symfony/messenger/Stamp/SerializerStamp.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
|
||||
*/
|
||||
final class SerializerStamp implements StampInterface
|
||||
{
|
||||
private array $context;
|
||||
|
||||
public function __construct(array $context)
|
||||
{
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
public function getContext(): array
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
}
|
||||
23
projects/priceservice/vendor/symfony/messenger/Stamp/StampInterface.php
vendored
Normal file
23
projects/priceservice/vendor/symfony/messenger/Stamp/StampInterface.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* An envelope stamp related to a message.
|
||||
*
|
||||
* Stamps must be serializable value objects for transport.
|
||||
*
|
||||
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
|
||||
*/
|
||||
interface StampInterface
|
||||
{
|
||||
}
|
||||
35
projects/priceservice/vendor/symfony/messenger/Stamp/TransportMessageIdStamp.php
vendored
Normal file
35
projects/priceservice/vendor/symfony/messenger/Stamp/TransportMessageIdStamp.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Added by a sender or receiver to indicate the id of this message in that transport.
|
||||
*
|
||||
* @author Ryan Weaver <ryan@symfonycasts.com>
|
||||
*/
|
||||
final class TransportMessageIdStamp implements StampInterface
|
||||
{
|
||||
private mixed $id;
|
||||
|
||||
/**
|
||||
* @param mixed $id some "identifier" of the message in a transport
|
||||
*/
|
||||
public function __construct(mixed $id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getId(): mixed
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
33
projects/priceservice/vendor/symfony/messenger/Stamp/TransportNamesStamp.php
vendored
Normal file
33
projects/priceservice/vendor/symfony/messenger/Stamp/TransportNamesStamp.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Stamp used to override the transport names specified in the Messenger routing configuration file.
|
||||
*/
|
||||
final class TransportNamesStamp implements StampInterface
|
||||
{
|
||||
private array $transportNames;
|
||||
|
||||
/**
|
||||
* @param string[]|string $transportNames Transport names to be used for the message
|
||||
*/
|
||||
public function __construct(array|string $transportNames)
|
||||
{
|
||||
$this->transportNames = (array) $transportNames;
|
||||
}
|
||||
|
||||
public function getTransportNames(): array
|
||||
{
|
||||
return $this->transportNames;
|
||||
}
|
||||
}
|
||||
35
projects/priceservice/vendor/symfony/messenger/Stamp/ValidationStamp.php
vendored
Normal file
35
projects/priceservice/vendor/symfony/messenger/Stamp/ValidationStamp.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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\Validator\Constraints\GroupSequence;
|
||||
|
||||
/**
|
||||
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
|
||||
*/
|
||||
final class ValidationStamp implements StampInterface
|
||||
{
|
||||
private array|GroupSequence $groups;
|
||||
|
||||
/**
|
||||
* @param string[]|GroupSequence $groups
|
||||
*/
|
||||
public function __construct(array|GroupSequence $groups)
|
||||
{
|
||||
$this->groups = $groups;
|
||||
}
|
||||
|
||||
public function getGroups(): array|GroupSequence
|
||||
{
|
||||
return $this->groups;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user