| @@ 9-89 (lines=81) @@ | ||
| 6 | /** |
|
| 7 | * Result object for Smart ID login response. |
|
| 8 | */ |
|
| 9 | class SmartIdResult implements ResultInterface |
|
| 10 | { |
|
| 11 | /** @var string response status */ |
|
| 12 | private $status; |
|
| 13 | ||
| 14 | /** @var string control code to display for user */ |
|
| 15 | private $controlCode; |
|
| 16 | ||
| 17 | /** @var string token for mobile status query */ |
|
| 18 | private $token; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Fields expected in response |
|
| 22 | * @return array |
|
| 23 | */ |
|
| 24 | public function getFields() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'status', |
|
| 28 | 'token', |
|
| 29 | 'control_code', |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Set status |
|
| 35 | * @param string $status |
|
| 36 | * @return void |
|
| 37 | */ |
|
| 38 | public function setStatus($status) |
|
| 39 | { |
|
| 40 | $this->status = $status; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * Get status |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function getStatus() |
|
| 48 | { |
|
| 49 | return $this->status; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Set control code |
|
| 54 | * @param string $controlCode |
|
| 55 | * @return void |
|
| 56 | */ |
|
| 57 | public function setControlCode($controlCode) |
|
| 58 | { |
|
| 59 | $this->controlCode = $controlCode; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * Get control code |
|
| 64 | * @return string |
|
| 65 | */ |
|
| 66 | public function getControlCode() |
|
| 67 | { |
|
| 68 | return $this->controlCode; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * Set token |
|
| 73 | * @param string $token |
|
| 74 | * @return void |
|
| 75 | */ |
|
| 76 | public function setToken($token) |
|
| 77 | { |
|
| 78 | $this->token = $token; |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * Get token |
|
| 83 | * @return string |
|
| 84 | */ |
|
| 85 | public function getToken() |
|
| 86 | { |
|
| 87 | return $this->token; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| @@ 9-89 (lines=81) @@ | ||
| 6 | /** |
|
| 7 | * Result object for mobile ID login response. |
|
| 8 | */ |
|
| 9 | class MobileResult implements ResultInterface |
|
| 10 | { |
|
| 11 | /** @var string response status */ |
|
| 12 | private $status; |
|
| 13 | ||
| 14 | /** @var string control code to display for user */ |
|
| 15 | private $controlCode; |
|
| 16 | ||
| 17 | /** @var string token for mobile status query */ |
|
| 18 | private $token; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Fields expected in response |
|
| 22 | * @return array |
|
| 23 | */ |
|
| 24 | public function getFields() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'status', |
|
| 28 | 'control_code', |
|
| 29 | 'token', |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Set status |
|
| 35 | * @param string $status |
|
| 36 | * @return void |
|
| 37 | */ |
|
| 38 | public function setStatus($status) |
|
| 39 | { |
|
| 40 | $this->status = $status; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * Get status |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function getStatus() |
|
| 48 | { |
|
| 49 | return $this->status; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Set control code |
|
| 54 | * @param string $controlCode |
|
| 55 | * @return void |
|
| 56 | */ |
|
| 57 | public function setControlCode($controlCode) |
|
| 58 | { |
|
| 59 | $this->controlCode = $controlCode; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * Get control code |
|
| 64 | * @return string |
|
| 65 | */ |
|
| 66 | public function getControlCode() |
|
| 67 | { |
|
| 68 | return $this->controlCode; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * Set token |
|
| 73 | * @param string $token |
|
| 74 | * @return void |
|
| 75 | */ |
|
| 76 | public function setToken($token) |
|
| 77 | { |
|
| 78 | $this->token = $token; |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * Get token |
|
| 83 | * @return string |
|
| 84 | */ |
|
| 85 | public function getToken() |
|
| 86 | { |
|
| 87 | return $this->token; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| @@ 9-89 (lines=81) @@ | ||
| 6 | /** |
|
| 7 | * Result object for mobile ID login status response. |
|
| 8 | */ |
|
| 9 | class MobileStatusResult implements ResultInterface |
|
| 10 | { |
|
| 11 | /** @var string response status */ |
|
| 12 | private $status; |
|
| 13 | ||
| 14 | /** @var string signature id */ |
|
| 15 | private $signatureId; |
|
| 16 | ||
| 17 | /** @var array signed document file */ |
|
| 18 | private $file = array(); |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Fields expected in response |
|
| 22 | * @return array |
|
| 23 | */ |
|
| 24 | public function getFields() |
|
| 25 | { |
|
| 26 | return [ |
|
| 27 | 'status', |
|
| 28 | 'signature_id', |
|
| 29 | 'file' |
|
| 30 | ]; |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Set status |
|
| 35 | * @param string $status |
|
| 36 | * @return void |
|
| 37 | */ |
|
| 38 | public function setStatus($status) |
|
| 39 | { |
|
| 40 | $this->status = $status; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * Get status |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function getStatus() |
|
| 48 | { |
|
| 49 | return $this->status; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Gets the value of file. |
|
| 54 | * @return array |
|
| 55 | */ |
|
| 56 | public function getFile() |
|
| 57 | { |
|
| 58 | return $this->file; |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Sets the value of file. |
|
| 63 | * @param array $file the file |
|
| 64 | * @return void |
|
| 65 | */ |
|
| 66 | public function setFile($file) |
|
| 67 | { |
|
| 68 | $this->file = $file; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * Gets the value of signatureId. |
|
| 73 | * @return mixed |
|
| 74 | */ |
|
| 75 | public function getSignatureId() |
|
| 76 | { |
|
| 77 | return $this->signatureId; |
|
| 78 | } |
|
| 79 | ||
| 80 | /** |
|
| 81 | * Sets the value of signatureId. |
|
| 82 | * @param mixed $signatureId the signature id |
|
| 83 | * @return void |
|
| 84 | */ |
|
| 85 | public function setSignatureId($signatureId) |
|
| 86 | { |
|
| 87 | $this->signatureId = $signatureId; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| @@ 6-77 (lines=72) @@ | ||
| 3 | ||
| 4 | use Isign\ResultInterface; |
|
| 5 | ||
| 6 | class ScResult implements ResultInterface |
|
| 7 | { |
|
| 8 | /** @var string response status */ |
|
| 9 | private $status; |
|
| 10 | ||
| 11 | /** @var array signed file containing: name, content, digest */ |
|
| 12 | private $file; |
|
| 13 | ||
| 14 | /** @var string signature id */ |
|
| 15 | private $signatureId; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * Fields expected in response |
|
| 19 | * @return array |
|
| 20 | */ |
|
| 21 | public function getFields() |
|
| 22 | { |
|
| 23 | return [ |
|
| 24 | 'status', |
|
| 25 | 'file', |
|
| 26 | 'signature_id' |
|
| 27 | ]; |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * @return string |
|
| 32 | */ |
|
| 33 | public function getStatus() |
|
| 34 | { |
|
| 35 | return $this->status; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @param string $status |
|
| 40 | */ |
|
| 41 | public function setStatus($status) |
|
| 42 | { |
|
| 43 | $this->status = $status; |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @return array |
|
| 48 | */ |
|
| 49 | public function getFile() |
|
| 50 | { |
|
| 51 | return $this->file; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @param array $file |
|
| 56 | */ |
|
| 57 | public function setFile($file) |
|
| 58 | { |
|
| 59 | $this->file = $file; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @return string |
|
| 64 | */ |
|
| 65 | public function getSignatureId() |
|
| 66 | { |
|
| 67 | return $this->signatureId; |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * @param string $signatureId |
|
| 72 | */ |
|
| 73 | public function setSignatureId($signatureId) |
|
| 74 | { |
|
| 75 | $this->signatureId = $signatureId; |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||