getRegistration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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\Controller\EventController;
15
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
16
use Psr\Http\Message\ServerRequestInterface;
17
18
/**
19
 * This event is triggered before depending registrations are created. Use setCreateDependingRegistrations to
20
 * override the original bahavior
21
 */
22
final class ModifyCreateDependingRegistrationsEvent
23
{
24
    public function __construct(
25
        private readonly Registration $registration,
26
        private bool $createDependingRegistrations,
27
        private readonly EventController $eventController,
28
        private readonly ServerRequestInterface $request
29
    ) {
30
    }
31
32
    public function getRegistration(): Registration
33
    {
34
        return $this->registration;
35
    }
36
37
    public function getEventController(): EventController
38
    {
39
        return $this->eventController;
40
    }
41
42
    public function getCreateDependingRegistrations(): bool
43
    {
44
        return $this->createDependingRegistrations;
45
    }
46
47
    public function setCreateDependingRegistrations(bool $createDependingRegistrations): void
48
    {
49
        $this->createDependingRegistrations = $createDependingRegistrations;
50
    }
51
52
    public function getRequest(): ServerRequestInterface
53
    {
54
        return $this->request;
55
    }
56
}
57