1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Copyright 2016 SURFnet B.V. |
5
|
|
|
* |
6
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
7
|
|
|
* you may not use this file except in compliance with the License. |
8
|
|
|
* You may obtain a copy of the License at |
9
|
|
|
* |
10
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
11
|
|
|
* |
12
|
|
|
* Unless required by applicable law or agreed to in writing, software |
13
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
14
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15
|
|
|
* See the License for the specific language governing permissions and |
16
|
|
|
* limitations under the License. |
17
|
|
|
*/ |
18
|
|
|
|
19
|
|
|
namespace Surfnet\Stepup\Configuration\Event; |
20
|
|
|
|
21
|
|
|
use Surfnet\Stepup\Configuration\Value\ContactInformation; |
22
|
|
|
use Surfnet\Stepup\Configuration\Value\Institution; |
23
|
|
|
use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId; |
24
|
|
|
use Surfnet\Stepup\Configuration\Value\Location; |
25
|
|
|
use Surfnet\Stepup\Configuration\Value\RaLocationId; |
26
|
|
|
use Surfnet\Stepup\Configuration\Value\RaLocationName; |
27
|
|
|
|
28
|
|
|
class RaLocationAddedEvent |
29
|
|
|
{ |
30
|
|
|
/** |
31
|
|
|
* @var InstitutionConfigurationId |
32
|
|
|
*/ |
33
|
|
|
public $institutionConfigurationId; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var RaLocationId |
37
|
|
|
*/ |
38
|
|
|
public $raLocationId; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var RaLocationName |
42
|
|
|
*/ |
43
|
|
|
public $raLocationName; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var Location |
47
|
|
|
*/ |
48
|
|
|
public $location; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var ContactInformation |
52
|
|
|
*/ |
53
|
|
|
public $contactInformation; |
54
|
|
|
|
55
|
|
|
public function __construct( |
56
|
|
|
InstitutionConfigurationId $institutionConfigurationId, |
57
|
|
|
RaLocationId $raLocationId, |
58
|
|
|
RaLocationName $raLocationName, |
59
|
|
|
Location $location, |
60
|
|
|
ContactInformation $contactInformation |
61
|
|
|
) { |
62
|
|
|
$this->institutionConfigurationId = $institutionConfigurationId; |
63
|
|
|
$this->raLocationId = $raLocationId; |
64
|
|
|
$this->raLocationName = $raLocationName; |
65
|
|
|
$this->location = $location; |
66
|
|
|
$this->contactInformation = $contactInformation; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public static function deserialize(array $data) |
70
|
|
|
{ |
71
|
|
|
return new self( |
72
|
|
|
$data['institution_configuration_id'], |
73
|
|
|
$data['ra_location_id'], |
74
|
|
|
$data['ra_location_name'], |
75
|
|
|
$data['location'], |
76
|
|
|
$data['contact_information'] |
77
|
|
|
); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function serialize() |
81
|
|
|
{ |
82
|
|
|
return [ |
83
|
|
|
'institution_configuration_id' => (string) $this->institutionConfigurationId, |
84
|
|
|
'ra_location_id' => (string) $this->raLocationId, |
85
|
|
|
'ra_location_name' => (string) $this->raLocationName, |
86
|
|
|
'location' => (string) $this->location, |
87
|
|
|
'contact_information' => (string) $this->contactInformation, |
88
|
|
|
]; |
89
|
|
|
} |
90
|
|
|
} |
91
|
|
|
|