Completed
Push — typo3-10-compatibility ( b4f2e1...42d8ec )
by Torben
03:17
created

AfterUserMessageSentEvent   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 126
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 0
dl 0
loc 126
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 1
A getRegistration() 0 4 1
A getBody() 0 4 1
A getSubject() 0 4 1
A getAttachments() 0 4 1
A getSenderName() 0 4 1
A getSenderEmail() 0 4 1
A getReplyToEmail() 0 4 1
A getNotificationService() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
namespace DERHANSEN\SfEventMgt\Event;
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
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
13
use DERHANSEN\SfEventMgt\Service\NotificationService;
14
15
/**
16
 * This event is triggered after a user message has been sent
17
 */
18
final class AfterUserMessageSentEvent
19
{
20
    /**
21
     * @var Registration
22
     */
23
    private $registration;
24
25
    /**
26
     * @var string
27
     */
28
    private $body;
29
30
    /**
31
     * @var string
32
     */
33
    private $subject;
34
35
    /**
36
     * @var array
37
     */
38
    private $attachments;
39
40
    /**
41
     * @var string
42
     */
43
    private $senderName;
44
45
    /**
46
     * @var string
47
     */
48
    private $senderEmail;
49
50
    /**
51
     * @var string
52
     */
53
    private $replyToEmail;
54
55
    /**
56
     * @var NotificationService
57
     */
58
    private $notificationService;
59
60
    public function __construct(
61
        Registration $registration,
62
        string $body,
63
        string $subject,
64
        array $attachments,
65
        string $senderName,
66
        string $senderEmail,
67
        string $replyToEmail,
68
        NotificationService $notificationService
69
    ) {
70
        $this->registration = $registration;
71
        $this->body = $body;
72
        $this->subject = $subject;
73
        $this->attachments = $attachments;
74
        $this->senderName = $senderName;
75
        $this->senderEmail = $senderEmail;
76
        $this->replyToEmail = $replyToEmail;
77
        $this->notificationService = $notificationService;
78
    }
79
80
    /**
81
     * @return Registration
82
     */
83
    public function getRegistration(): Registration
84
    {
85
        return $this->registration;
86
    }
87
88
    /**
89
     * @return string
90
     */
91
    public function getBody(): string
92
    {
93
        return $this->body;
94
    }
95
96
    /**
97
     * @return string
98
     */
99
    public function getSubject(): string
100
    {
101
        return $this->subject;
102
    }
103
104
    /**
105
     * @return array
106
     */
107
    public function getAttachments(): array
108
    {
109
        return $this->attachments;
110
    }
111
112
    /**
113
     * @return string
114
     */
115
    public function getSenderName(): string
116
    {
117
        return $this->senderName;
118
    }
119
120
    /**
121
     * @return string
122
     */
123
    public function getSenderEmail(): string
124
    {
125
        return $this->senderEmail;
126
    }
127
128
    /**
129
     * @return string
130
     */
131
    public function getReplyToEmail(): string
132
    {
133
        return $this->replyToEmail;
134
    }
135
136
    /**
137
     * @return NotificationService
138
     */
139
    public function getNotificationService(): NotificationService
140
    {
141
        return $this->notificationService;
142
    }
143
}
144