| @@ 26-70 (lines=45) @@ | ||
| 23 | use Surfnet\Stepup\Configuration\Value\InstitutionConfigurationId; |
|
| 24 | use Surfnet\Stepup\Configuration\Value\RaLocationId; |
|
| 25 | ||
| 26 | class RaLocationContactInformationChangedEvent implements SerializableInterface |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * @var InstitutionConfigurationId |
|
| 30 | */ |
|
| 31 | public $institutionConfigurationId; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var RaLocationId |
|
| 35 | */ |
|
| 36 | public $raLocationId; |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @var ContactInformation |
|
| 40 | */ |
|
| 41 | public $contactInformation; |
|
| 42 | ||
| 43 | public function __construct( |
|
| 44 | InstitutionConfigurationId $institutionConfigurationId, |
|
| 45 | RaLocationId $raLocationId, |
|
| 46 | ContactInformation $contactInformation |
|
| 47 | ) { |
|
| 48 | $this->institutionConfigurationId = $institutionConfigurationId; |
|
| 49 | $this->raLocationId = $raLocationId; |
|
| 50 | $this->contactInformation = $contactInformation; |
|
| 51 | } |
|
| 52 | ||
| 53 | public static function deserialize(array $data) |
|
| 54 | { |
|
| 55 | return new self( |
|
| 56 | new InstitutionConfigurationId($data['institution_configuration_id']), |
|
| 57 | new RaLocationId($data['ra_location_id']), |
|
| 58 | new ContactInformation($data['contact_information']) |
|
| 59 | ); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function serialize() |
|
| 63 | { |
|
| 64 | return [ |
|
| 65 | 'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(), |
|
| 66 | 'ra_location_id' => $this->raLocationId->getRaLocationId(), |
|
| 67 | 'contact_information' => $this->contactInformation->getContactInformation(), |
|
| 68 | ]; |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||
| @@ 26-70 (lines=45) @@ | ||
| 23 | use Surfnet\Stepup\Configuration\Value\Location; |
|
| 24 | use Surfnet\Stepup\Configuration\Value\RaLocationId; |
|
| 25 | ||
| 26 | class RaLocationRelocatedEvent implements SerializableInterface |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * @var InstitutionConfigurationId |
|
| 30 | */ |
|
| 31 | public $institutionConfigurationId; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var RaLocationId |
|
| 35 | */ |
|
| 36 | public $raLocationId; |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @var Location |
|
| 40 | */ |
|
| 41 | public $location; |
|
| 42 | ||
| 43 | public function __construct( |
|
| 44 | InstitutionConfigurationId $institutionConfigurationId, |
|
| 45 | RaLocationId $raLocationId, |
|
| 46 | Location $location |
|
| 47 | ) { |
|
| 48 | $this->institutionConfigurationId = $institutionConfigurationId; |
|
| 49 | $this->raLocationId = $raLocationId; |
|
| 50 | $this->location = $location; |
|
| 51 | } |
|
| 52 | ||
| 53 | public static function deserialize(array $data) |
|
| 54 | { |
|
| 55 | return new self( |
|
| 56 | new InstitutionConfigurationId($data['institution_configuration_id']), |
|
| 57 | new RaLocationId($data['ra_location_id']), |
|
| 58 | new Location($data['location']) |
|
| 59 | ); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function serialize() |
|
| 63 | { |
|
| 64 | return [ |
|
| 65 | 'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(), |
|
| 66 | 'ra_location_id' => $this->raLocationId->getRaLocationId(), |
|
| 67 | 'location' => $this->location->getLocation(), |
|
| 68 | ]; |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||
| @@ 26-70 (lines=45) @@ | ||
| 23 | use Surfnet\Stepup\Configuration\Value\RaLocationId; |
|
| 24 | use Surfnet\Stepup\Configuration\Value\RaLocationName; |
|
| 25 | ||
| 26 | class RaLocationRenamedEvent implements SerializableInterface |
|
| 27 | { |
|
| 28 | /** |
|
| 29 | * @var InstitutionConfigurationId |
|
| 30 | */ |
|
| 31 | public $institutionConfigurationId; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var RaLocationId |
|
| 35 | */ |
|
| 36 | public $raLocationId; |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @var RaLocationName |
|
| 40 | */ |
|
| 41 | public $raLocationName; |
|
| 42 | ||
| 43 | public function __construct( |
|
| 44 | InstitutionConfigurationId $institutionConfigurationId, |
|
| 45 | RaLocationId $raLocationId, |
|
| 46 | RaLocationName $raLocationName |
|
| 47 | ) { |
|
| 48 | $this->institutionConfigurationId = $institutionConfigurationId; |
|
| 49 | $this->raLocationId = $raLocationId; |
|
| 50 | $this->raLocationName = $raLocationName; |
|
| 51 | } |
|
| 52 | ||
| 53 | public static function deserialize(array $data) |
|
| 54 | { |
|
| 55 | return new self( |
|
| 56 | new InstitutionConfigurationId($data['institution_configuration_id']), |
|
| 57 | new RaLocationId($data['ra_location_id']), |
|
| 58 | new RaLocationName($data['ra_location_name']) |
|
| 59 | ); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function serialize() |
|
| 63 | { |
|
| 64 | return [ |
|
| 65 | 'institution_configuration_id' => $this->institutionConfigurationId->getInstitutionConfigurationId(), |
|
| 66 | 'ra_location_id' => $this->raLocationId->getRaLocationId(), |
|
| 67 | 'ra_location_name' => $this->raLocationName->getRaLocationName(), |
|
| 68 | ]; |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||