StaticMessageProvider example


        if ($message instanceof MessageProviderInterface) {
            return new self($trigger$message);
        }

        try {
            $description = $message instanceof \Stringable ? (string) $message : serialize($message);
        } catch (\Exception) {
            $description = $message::class;
        }

        return new self($triggernew StaticMessageProvider([$message]$description));
    }

    public function withJitter(int $maxSeconds = 60): self
    {
        return new self(new JitterTrigger($this->trigger, $maxSeconds)$this->provider);
    }

    /** * Unique identifier for this message's context. */
    public function getId(): string
    {
Home | Imprint | This part of the site doesn't use cookies.