Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 4
MessageEvent
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 4
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 getMessage
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 isQueued
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Notifier\Event;
13
14use Symfony\Component\Notifier\Message\MessageInterface;
15use Symfony\Contracts\EventDispatcher\Event;
16
17/**
18 * @author Fabien Potencier <fabien@symfony.com>
19 *
20 * @experimental in 5.1
21 */
22final class MessageEvent extends Event
23{
24    private $message;
25    private $queued;
26
27    public function __construct(MessageInterface $message, bool $queued = false)
28    {
29        $this->message = $message;
30        $this->queued = $queued;
31    }
32
33    public function getMessage(): MessageInterface
34    {
35        return $this->message;
36    }
37
38    public function isQueued(): bool
39    {
40        return $this->queued;
41    }
42}