src/Surfnet/Stepup/Identity/Event/InstitutionsAddedToWhitelistEvent.php 1 location
|
@@ 23-51 (lines=29) @@
|
| 20 |
|
|
| 21 |
|
use Surfnet\Stepup\Identity\Collection\InstitutionCollection; |
| 22 |
|
|
| 23 |
|
class InstitutionsAddedToWhitelistEvent implements WhitelistEvent |
| 24 |
|
{ |
| 25 |
|
/** |
| 26 |
|
* @var InstitutionCollection |
| 27 |
|
*/ |
| 28 |
|
public $addedInstitutions; |
| 29 |
|
|
| 30 |
|
public function __construct(InstitutionCollection $addedInstitutions) |
| 31 |
|
{ |
| 32 |
|
$this->addedInstitutions = $addedInstitutions; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* @param array $data |
| 37 |
|
* @return InstitutionsAddedToWhitelistEvent |
| 38 |
|
*/ |
| 39 |
|
public static function deserialize(array $data) |
| 40 |
|
{ |
| 41 |
|
return new self(InstitutionCollection::deserialize($data['added_institutions'])); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @return array |
| 46 |
|
*/ |
| 47 |
|
public function serialize() |
| 48 |
|
{ |
| 49 |
|
return ['added_institutions' => $this->addedInstitutions->serialize()]; |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
|
src/Surfnet/Stepup/Identity/Event/InstitutionsRemovedFromWhitelistEvent.php 1 location
|
@@ 23-51 (lines=29) @@
|
| 20 |
|
|
| 21 |
|
use Surfnet\Stepup\Identity\Collection\InstitutionCollection; |
| 22 |
|
|
| 23 |
|
class InstitutionsRemovedFromWhitelistEvent implements WhitelistEvent |
| 24 |
|
{ |
| 25 |
|
/** |
| 26 |
|
* @var InstitutionCollection |
| 27 |
|
*/ |
| 28 |
|
public $removedInstitutions; |
| 29 |
|
|
| 30 |
|
public function __construct(InstitutionCollection $removedInstitutions) |
| 31 |
|
{ |
| 32 |
|
$this->removedInstitutions = $removedInstitutions; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* @param array $data |
| 37 |
|
* @return InstitutionsRemovedFromWhitelistEvent |
| 38 |
|
*/ |
| 39 |
|
public static function deserialize(array $data) |
| 40 |
|
{ |
| 41 |
|
return new self(InstitutionCollection::deserialize($data['removed_institutions'])); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @return array |
| 46 |
|
*/ |
| 47 |
|
public function serialize() |
| 48 |
|
{ |
| 49 |
|
return ['removed_institutions' => $this->removedInstitutions->serialize()]; |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
|
src/Surfnet/Stepup/Identity/Event/WhitelistCreatedEvent.php 1 location
|
@@ 23-48 (lines=26) @@
|
| 20 |
|
|
| 21 |
|
use Surfnet\Stepup\Identity\Collection\InstitutionCollection; |
| 22 |
|
|
| 23 |
|
class WhitelistCreatedEvent implements WhitelistEvent |
| 24 |
|
{ |
| 25 |
|
/** |
| 26 |
|
* @var InstitutionCollection |
| 27 |
|
*/ |
| 28 |
|
public $whitelistedInstitutions; |
| 29 |
|
|
| 30 |
|
public function __construct(InstitutionCollection $institutionCollection) |
| 31 |
|
{ |
| 32 |
|
$this->whitelistedInstitutions = $institutionCollection; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* @param array $data |
| 37 |
|
* @return WhitelistCreatedEvent |
| 38 |
|
*/ |
| 39 |
|
public static function deserialize(array $data) |
| 40 |
|
{ |
| 41 |
|
return new self(InstitutionCollection::deserialize($data['whitelisted_institutions'])); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
public function serialize() |
| 45 |
|
{ |
| 46 |
|
return ['whitelisted_institutions' => $this->whitelistedInstitutions->serialize()]; |
| 47 |
|
} |
| 48 |
|
} |
| 49 |
|
|
src/Surfnet/Stepup/Identity/Event/WhitelistReplacedEvent.php 1 location
|
@@ 23-51 (lines=29) @@
|
| 20 |
|
|
| 21 |
|
use Surfnet\Stepup\Identity\Collection\InstitutionCollection; |
| 22 |
|
|
| 23 |
|
class WhitelistReplacedEvent implements WhitelistEvent |
| 24 |
|
{ |
| 25 |
|
/** |
| 26 |
|
* @var InstitutionCollection |
| 27 |
|
*/ |
| 28 |
|
public $whitelistedInstitutions; |
| 29 |
|
|
| 30 |
|
public function __construct(InstitutionCollection $whitelistedInstitutions) |
| 31 |
|
{ |
| 32 |
|
$this->whitelistedInstitutions = $whitelistedInstitutions; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* @param array $data |
| 37 |
|
* @return WhitelistReplacedEvent |
| 38 |
|
*/ |
| 39 |
|
public static function deserialize(array $data) |
| 40 |
|
{ |
| 41 |
|
return new self(InstitutionCollection::deserialize($data['whitelisted_institutions'])); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* @return array |
| 46 |
|
*/ |
| 47 |
|
public function serialize() |
| 48 |
|
{ |
| 49 |
|
return ['whitelisted_institutions' => $this->whitelistedInstitutions->serialize()]; |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
|