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

ModifyUserMessageSenderEvent   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 120
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 1
A getSenderName() 0 4 1
A getSenderEmail() 0 4 1
A getReplyToEmail() 0 4 1
A getRegistration() 0 4 1
A getType() 0 4 1
A getNotificationService() 0 4 1
A setSenderName() 0 4 1
A setSenderEmail() 0 4 1
A setReplyToEmail() 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 should be used to modify the sender data of a user message. Use the $type variable to distinguish
17
 * between the different types of messages
18
 */
19
final class ModifyUserMessageSenderEvent
20
{
21
    /**
22
     * @var string
23
     */
24
    private $senderName;
25
26
    /**
27
     * @var string
28
     */
29
    private $senderEmail;
30
31
    /**
32
     * @var string
33
     */
34
    private $replyToEmail;
35
36
    /**
37
     * @var Registration
38
     */
39
    private $registration;
40
41
    /**
42
     * @var int
43
     */
44
    private $type;
45
46
    /**
47
     * @var NotificationService
48
     */
49
    private $notificationService;
50
51
    public function __construct(
52
        string $senderName,
53
        string $senderEmail,
54
        string $replyToEmail,
55
        Registration $registration,
56
        int $type,
57
        NotificationService $notificationService
58
    ) {
59
        $this->senderName = $senderName;
60
        $this->senderEmail = $senderEmail;
61
        $this->replyToEmail = $replyToEmail;
62
        $this->registration = $registration;
63
        $this->type = $type;
64
        $this->notificationService = $notificationService;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getSenderName(): string
71
    {
72
        return $this->senderName;
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getSenderEmail(): string
79
    {
80
        return $this->senderEmail;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getReplyToEmail(): string
87
    {
88
        return $this->replyToEmail;
89
    }
90
91
    /**
92
     * @return Registration
93
     */
94
    public function getRegistration(): Registration
95
    {
96
        return $this->registration;
97
    }
98
99
    /**
100
     * @return int
101
     */
102
    public function getType(): int
103
    {
104
        return $this->type;
105
    }
106
107
    /**
108
     * @return NotificationService
109
     */
110
    public function getNotificationService(): NotificationService
111
    {
112
        return $this->notificationService;
113
    }
114
115
    /**
116
     * @param string $senderName
117
     */
118
    public function setSenderName(string $senderName): void
119
    {
120
        $this->senderName = $senderName;
121
    }
122
123
    /**
124
     * @param string $senderEmail
125
     */
126
    public function setSenderEmail(string $senderEmail): void
127
    {
128
        $this->senderEmail = $senderEmail;
129
    }
130
131
    /**
132
     * @param string $replyToEmail
133
     */
134
    public function setReplyToEmail(string $replyToEmail): void
135
    {
136
        $this->replyToEmail = $replyToEmail;
137
    }
138
}
139