1
|
|
|
<?php |
2
|
|
|
namespace EventEspresso\core\services\commands\registration; |
3
|
|
|
|
4
|
|
|
use EventEspresso\core\services\commands\Command; |
5
|
|
|
|
6
|
|
|
if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
7
|
|
|
exit( 'No direct script access allowed' ); |
8
|
|
|
} |
9
|
|
|
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class CopyRegistrationDetailsCommand |
14
|
|
|
* DTO for passing data to a CopyRegistrationDetailsCommandHandler |
15
|
|
|
* |
16
|
|
|
* @package Event Espresso |
17
|
|
|
* @author Brent Christensen |
18
|
|
|
* @since 4.9.0 |
19
|
|
|
*/ |
20
|
|
|
class CopyRegistrationDetailsCommand extends Command |
21
|
|
|
{ |
22
|
|
|
|
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var \EE_Registration $target_registration |
26
|
|
|
*/ |
27
|
|
|
private $target_registration; |
28
|
|
|
|
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var \EE_Registration $registration_to_copy |
32
|
|
|
*/ |
33
|
|
|
private $registration_to_copy; |
34
|
|
|
|
35
|
|
|
|
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* CopyRegistrationDetailsCommand constructor. |
39
|
|
|
* |
40
|
|
|
* @param \EE_Registration $target_registration |
41
|
|
|
* @param \EE_Registration $registration_to_copy |
42
|
|
|
v |
43
|
|
|
*/ |
44
|
|
|
public function __construct( |
45
|
|
|
\EE_Registration $target_registration, |
46
|
|
|
\EE_Registration $registration_to_copy |
47
|
|
|
) { |
48
|
|
|
$this->target_registration = $target_registration; |
49
|
|
|
$this->registration_to_copy = $registration_to_copy; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
|
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return \EE_Registration |
56
|
|
|
*/ |
57
|
|
|
public function targetRegistration() { |
58
|
|
|
return $this->target_registration; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
|
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return \EE_Registration |
65
|
|
|
*/ |
66
|
|
|
public function registrationToCopy() { |
67
|
|
|
return $this->registration_to_copy; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
|
71
|
|
|
|
72
|
|
|
} |
73
|
|
|
// End of file CopyRegistrationDetailsCommand.php |
74
|
|
|
// Location: /CopyRegistrationDetailsCommand.php |