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

ProcessPaymentNotifyEvent::setUpdateRegistration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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\Controller\PaymentController;
13
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
14
15
/**
16
 * This event is triggered before the payment notify view is rendered. This event must be used to handle feedback
17
 * from the payment provider when the notification action is triggered (e.g. payment denied afterwards)
18
 */
19
final class ProcessPaymentNotifyEvent
20
{
21
    /**
22
     * @var array
23
     */
24
    private $variables;
25
26
    /**
27
     * @var string
28
     */
29
    private $paymentMethod;
30
31
    /**
32
     * @var bool
33
     */
34
    private $updateRegistration;
35
36
    /**
37
     * @var Registration
38
     */
39
    private $registration;
40
41
    /**
42
     * @var array
43
     */
44
    private $getVariables;
45
46
    /**
47
     * @var PaymentController
48
     */
49
    private $paymentController;
50
51
    public function __construct(
52
        array $variables,
53
        string $paymentMethod,
54
        bool $updateRegistration,
55
        Registration $registration,
56
        array $getVariables,
57
        PaymentController $paymentController
58
    ) {
59
        $this->variables = $variables;
60
        $this->paymentMethod = $paymentMethod;
61
        $this->updateRegistration = $updateRegistration;
62
        $this->registration = $registration;
63
        $this->getVariables = $getVariables;
64
        $this->paymentController = $paymentController;
65
    }
66
67
    /**
68
     * @return array
69
     */
70
    public function getVariables(): array
71
    {
72
        return $this->variables;
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getPaymentMethod(): string
79
    {
80
        return $this->paymentMethod;
81
    }
82
83
    /**
84
     * @return bool
85
     */
86
    public function getUpdateRegistration(): bool
87
    {
88
        return $this->updateRegistration;
89
    }
90
91
    /**
92
     * @return Registration
93
     */
94
    public function getRegistration(): Registration
95
    {
96
        return $this->registration;
97
    }
98
99
    /**
100
     * @return array
101
     */
102
    public function getGetVariables(): array
103
    {
104
        return $this->getVariables;
105
    }
106
107
    /**
108
     * @return PaymentController
109
     */
110
    public function getPaymentController(): PaymentController
111
    {
112
        return $this->paymentController;
113
    }
114
115
    /**
116
     * @param array $variables
117
     */
118
    public function setVariables(array $variables): void
119
    {
120
        $this->variables = $variables;
121
    }
122
123
    /**
124
     * @param bool $updateRegistration
125
     */
126
    public function setUpdateRegistration(bool $updateRegistration): void
127
    {
128
        $this->updateRegistration = $updateRegistration;
129
    }
130
}
131