| @@ 21-64 (lines=44) @@ | ||
| 18 | ||
| 19 | namespace Surfnet\StepupMiddlewareClientBundle\Command; |
|
| 20 | ||
| 21 | class AddRaLocationCommand extends AbstractCommand |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @Assert\NotBlank() |
|
| 25 | * @Assert\Type(type="string") |
|
| 26 | * |
|
| 27 | * @var string |
|
| 28 | */ |
|
| 29 | private $institution; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @Assert\NotBlank() |
|
| 33 | * @Assert\Type(type="string") |
|
| 34 | * |
|
| 35 | * @var string |
|
| 36 | */ |
|
| 37 | private $name; |
|
| 38 | ||
| 39 | /** |
|
| 40 | * @Assert\NotBlank() |
|
| 41 | * @Assert\Type(type="string") |
|
| 42 | * |
|
| 43 | * @var string |
|
| 44 | */ |
|
| 45 | public $location; |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @Assert\NotBlank() |
|
| 49 | * @Assert\Type(type="string") |
|
| 50 | * |
|
| 51 | * @var string |
|
| 52 | */ |
|
| 53 | public $contactInformation; |
|
| 54 | ||
| 55 | public function serialise() |
|
| 56 | { |
|
| 57 | return [ |
|
| 58 | 'institution' => $this->institution, |
|
| 59 | 'name' => $this->name, |
|
| 60 | 'location' => $this->location, |
|
| 61 | 'contact_information' => $this->contactInformation, |
|
| 62 | ]; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| @@ 21-73 (lines=53) @@ | ||
| 18 | ||
| 19 | namespace Surfnet\StepupMiddlewareClientBundle\Command; |
|
| 20 | ||
| 21 | class ChangeRaLocationCommand extends AbstractCommand |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @Assert\NotBlank() |
|
| 25 | * @Assert\Type(type="string") |
|
| 26 | * |
|
| 27 | * @var string |
|
| 28 | */ |
|
| 29 | private $id; |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @Assert\NotBlank() |
|
| 33 | * @Assert\Type(type="string") |
|
| 34 | * |
|
| 35 | * @var string |
|
| 36 | */ |
|
| 37 | private $institution; |
|
| 38 | ||
| 39 | /** |
|
| 40 | * @Assert\NotBlank() |
|
| 41 | * @Assert\Type(type="string") |
|
| 42 | * |
|
| 43 | * @var string |
|
| 44 | */ |
|
| 45 | private $name; |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @Assert\NotBlank() |
|
| 49 | * @Assert\Type(type="string") |
|
| 50 | * |
|
| 51 | * @var string |
|
| 52 | */ |
|
| 53 | public $location; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @Assert\NotBlank() |
|
| 57 | * @Assert\Type(type="string") |
|
| 58 | * |
|
| 59 | * @var string |
|
| 60 | */ |
|
| 61 | public $contactInformation; |
|
| 62 | ||
| 63 | public function serialise() |
|
| 64 | { |
|
| 65 | return [ |
|
| 66 | 'id' => $this->id, |
|
| 67 | 'institution' => $this->institution, |
|
| 68 | 'name' => $this->name, |
|
| 69 | 'location' => $this->location, |
|
| 70 | 'contact_information' => $this->contactInformation, |
|
| 71 | ]; |
|
| 72 | } |
|
| 73 | } |
|
| 74 | ||
| @@ 24-80 (lines=57) @@ | ||
| 21 | use Surfnet\StepupMiddlewareClientBundle\Command\AbstractCommand; |
|
| 22 | use Symfony\Component\Validator\Constraints as Assert; |
|
| 23 | ||
| 24 | class AccreditIdentityCommand extends AbstractCommand |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * @Assert\NotBlank() |
|
| 28 | * @Assert\Type(type="string") |
|
| 29 | * |
|
| 30 | * @var string |
|
| 31 | */ |
|
| 32 | public $identityId; |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @Assert\NotBlank() |
|
| 36 | * @Assert\Type(type="string") |
|
| 37 | * |
|
| 38 | * @var string |
|
| 39 | */ |
|
| 40 | public $institution; |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @Assert\NotBlank() |
|
| 44 | * @Assert\Type(type="string") |
|
| 45 | * @Assert\Choice(choices={"ra", "raa"}) |
|
| 46 | * |
|
| 47 | * @var string |
|
| 48 | */ |
|
| 49 | public $role; |
|
| 50 | ||
| 51 | /** |
|
| 52 | * @Assert\NotBlank() |
|
| 53 | * @Assert\Type(type="string") |
|
| 54 | * |
|
| 55 | * @var string |
|
| 56 | */ |
|
| 57 | public $location; |
|
| 58 | ||
| 59 | /** |
|
| 60 | * @Assert\NotBlank() |
|
| 61 | * @Assert\Type(type="string") |
|
| 62 | * |
|
| 63 | * @var string |
|
| 64 | */ |
|
| 65 | public $contactInformation; |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @return array |
|
| 69 | */ |
|
| 70 | public function serialise() |
|
| 71 | { |
|
| 72 | return [ |
|
| 73 | 'identity_id' => $this->identityId, |
|
| 74 | 'institution' => $this->institution, |
|
| 75 | 'role' => $this->role, |
|
| 76 | 'location' => $this->location, |
|
| 77 | 'contact_information' => $this->contactInformation |
|
| 78 | ]; |
|
| 79 | } |
|
| 80 | } |
|
| 81 | ||