Completed
Push — pull-request/8500 ( e49efc )
by Kamil
18:54
created

EmailSendEvent::getReplyTo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Sylius\Component\Mailer\Event;
15
16
use Sylius\Component\Mailer\Model\EmailInterface;
17
use Symfony\Component\EventDispatcher\Event;
18
19
/**
20
 * @author Gonzalo Vilaseca <[email protected]>
21
 */
22
final class EmailSendEvent extends Event
23
{
24
    /**
25
     * @var mixed
26
     */
27
    protected $message;
28
29
    /**
30
     * @var string[]
31
     */
32
    protected $recipients;
33
34
    /**
35
     * @var EmailInterface
36
     */
37
    protected $email;
38
39
    /**
40
     * @var array
41
     */
42
    protected $data;
43
44
    /**
45
     * @var string[]
46
     */
47
    protected $replyTo;
48
49
    /**
50
     * @param mixed $message
51
     * @param array $recipients
52
     * @param EmailInterface $email
53
     * @param array $data
54
     */
55
    public function __construct($message, EmailInterface $email, array $data, array $recipients = [], array $replyTo = [])
56
    {
57
        $this->message = $message;
58
        $this->email = $email;
59
        $this->data = $data;
60
        $this->recipients = $recipients;
61
        $this->replyTo = $replyTo;
62
    }
63
64
    /**
65
     * @return array
66
     */
67
    public function getRecipients(): array
68
    {
69
        return $this->recipients;
70
    }
71
72
    /**
73
     * @return EmailInterface
74
     */
75
    public function getEmail(): EmailInterface
76
    {
77
        return $this->email;
78
    }
79
80
    /**
81
     * @return mixed
82
     */
83
    public function getMessage()
84
    {
85
        return $this->message;
86
    }
87
88
    /**
89
     * @return array
90
     */
91
    public function getData(): array
92
    {
93
        return $this->data;
94
    }
95
96
    /**
97
     * @return string[]
98
     */
99
    public function getReplyTo(): array
100
    {
101
        return $this->replyTo;
102
    }
103
}
104