1 | <?php |
||
8 | class ScResult implements ResultInterface |
||
9 | { |
||
10 | /** @var string response status */ |
||
11 | private $status; |
||
12 | /** @var string hash which needs to be signed */ |
||
13 | private $dtbs; |
||
14 | /** @var string session token */ |
||
15 | private $token; |
||
16 | /** @var string user's first name */ |
||
17 | private $name; |
||
18 | /** @var string user's last name */ |
||
19 | private $surname; |
||
20 | /** @var string user's personal code */ |
||
21 | private $code; |
||
22 | /** @var string user's country */ |
||
23 | private $country; |
||
24 | /** @var string user's email (if available) */ |
||
25 | private $email; |
||
26 | /** @var string user's login certificate */ |
||
27 | private $certificate; |
||
28 | /** @var string signature algorithm */ |
||
29 | private $algorithm; |
||
30 | |||
31 | /** |
||
32 | * Fields expected in response |
||
33 | * @return array |
||
34 | */ |
||
35 | 9 | public function getFields() |
|
36 | { |
||
37 | return [ |
||
38 | 9 | 'status', |
|
39 | 'dtbs', |
||
40 | 'token', |
||
41 | 'name', |
||
42 | 'surname', |
||
43 | 'code', |
||
44 | 'country', |
||
45 | 'email', |
||
46 | 'certificate', |
||
47 | 'algorithm', |
||
48 | ]; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 1 | public function getStatus() |
|
55 | { |
||
56 | 1 | return $this->status; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @param string $status |
||
61 | */ |
||
62 | 1 | public function setStatus($status) |
|
63 | { |
||
64 | 1 | $this->status = $status; |
|
65 | 1 | } |
|
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | 1 | public function getDtbs() |
|
71 | { |
||
72 | 1 | return $this->dtbs; |
|
73 | } |
||
74 | |||
75 | /** |
||
76 | * @param string $dtbs |
||
77 | */ |
||
78 | 1 | public function setDtbs($dtbs) |
|
79 | { |
||
80 | 1 | $this->dtbs = $dtbs; |
|
81 | 1 | } |
|
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | 1 | public function getToken() |
|
87 | { |
||
88 | 1 | return $this->token; |
|
89 | } |
||
90 | |||
91 | /** |
||
92 | * @param string $token |
||
93 | */ |
||
94 | 1 | public function setToken($token) |
|
95 | { |
||
96 | 1 | $this->token = $token; |
|
97 | 1 | } |
|
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | 1 | public function getName() |
|
103 | { |
||
104 | 1 | return $this->name; |
|
105 | } |
||
106 | |||
107 | /** |
||
108 | * @param string $name |
||
109 | */ |
||
110 | 1 | public function setName($name) |
|
111 | { |
||
112 | 1 | $this->name = $name; |
|
113 | 1 | } |
|
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | 1 | public function getSurname() |
|
119 | { |
||
120 | 1 | return $this->surname; |
|
121 | } |
||
122 | |||
123 | /** |
||
124 | * @param string $surname |
||
125 | */ |
||
126 | 1 | public function setSurname($surname) |
|
127 | { |
||
128 | 1 | $this->surname = $surname; |
|
129 | 1 | } |
|
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | 1 | public function getCode() |
|
135 | { |
||
136 | 1 | return $this->code; |
|
137 | } |
||
138 | |||
139 | /** |
||
140 | * @param string $code |
||
141 | */ |
||
142 | 1 | public function setCode($code) |
|
143 | { |
||
144 | 1 | $this->code = $code; |
|
145 | 1 | } |
|
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | 1 | public function getCountry() |
|
151 | { |
||
152 | 1 | return $this->country; |
|
153 | } |
||
154 | |||
155 | /** |
||
156 | * @param string $country |
||
157 | */ |
||
158 | 1 | public function setCountry($country) |
|
159 | { |
||
160 | 1 | $this->country = $country; |
|
161 | 1 | } |
|
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | 1 | public function getCertificate() |
|
167 | { |
||
168 | 1 | return $this->certificate; |
|
169 | } |
||
170 | |||
171 | /** |
||
172 | * @param string $certificate |
||
173 | */ |
||
174 | 1 | public function setCertificate($certificate) |
|
175 | { |
||
176 | 1 | $this->certificate = $certificate; |
|
177 | 1 | } |
|
178 | |||
179 | /** |
||
180 | * Gets the value of algorithm. |
||
181 | * @return mixed |
||
182 | */ |
||
183 | 1 | public function getAlgorithm() |
|
184 | { |
||
185 | 1 | return $this->algorithm; |
|
186 | } |
||
187 | |||
188 | /** |
||
189 | * Sets the value of algorithm. |
||
190 | * @param mixed $algorithm the algorithm |
||
191 | * @return void |
||
192 | */ |
||
193 | 1 | public function setAlgorithm($algorithm) |
|
194 | { |
||
195 | 1 | $this->algorithm = $algorithm; |
|
196 | 1 | } |
|
197 | |||
198 | /** |
||
199 | * Gets the value of email. |
||
200 | * @return mixed |
||
201 | */ |
||
202 | public function getEmail() |
||
206 | |||
207 | /** |
||
208 | * Sets the value of email. |
||
209 | * @param mixed $email the email |
||
210 | * @return void |
||
211 | */ |
||
212 | public function setEmail($email) |
||
216 | } |
||
217 |