Completed
Push — master ( 70dfe1...a97a1c )
by Torben
04:18
created

AfterAdminMessageSentEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
cc 1
nc 1
nop 7
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Event;
13
14
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
15
use DERHANSEN\SfEventMgt\Service\NotificationService;
16
17
/**
18
 * This event is triggered after a admin message has been sent
19
 */
20
final class AfterAdminMessageSentEvent
21
{
22
    /**
23
     * @var Registration
24
     */
25
    private $registration;
26
27
    /**
28
     * @var string
29
     */
30
    private $body;
31
32
    /**
33
     * @var string
34
     */
35
    private $subject;
36
37
    /**
38
     * @var array
39
     */
40
    private $attachments;
41
42
    /**
43
     * @var string
44
     */
45
    private $senderName;
46
47
    /**
48
     * @var string
49
     */
50
    private $senderEmail;
51
52
    /**
53
     * @var NotificationService
54
     */
55
    private $notificationService;
56
57
    public function __construct(
58
        Registration $registration,
59
        string $body,
60
        string $subject,
61
        array $attachments,
62
        string $senderName,
63
        string $senderEmail,
64
        NotificationService $notificationService
65
    ) {
66
        $this->registration = $registration;
67
        $this->body = $body;
68
        $this->subject = $subject;
69
        $this->attachments = $attachments;
70
        $this->senderName = $senderName;
71
        $this->senderEmail = $senderEmail;
72
        $this->notificationService = $notificationService;
73
    }
74
75
    /**
76
     * @return Registration
77
     */
78
    public function getRegistration(): Registration
79
    {
80
        return $this->registration;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getBody(): string
87
    {
88
        return $this->body;
89
    }
90
91
    /**
92
     * @return string
93
     */
94
    public function getSubject(): string
95
    {
96
        return $this->subject;
97
    }
98
99
    /**
100
     * @return array
101
     */
102
    public function getAttachments(): array
103
    {
104
        return $this->attachments;
105
    }
106
107
    /**
108
     * @return string
109
     */
110
    public function getSenderName(): string
111
    {
112
        return $this->senderName;
113
    }
114
115
    /**
116
     * @return string
117
     */
118
    public function getSenderEmail(): string
119
    {
120
        return $this->senderEmail;
121
    }
122
123
    /**
124
     * @return NotificationService
125
     */
126
    public function getNotificationService(): NotificationService
127
    {
128
        return $this->notificationService;
129
    }
130
}
131