@@ 206-216 (lines=11) @@ | ||
203 | return $this->requiredProperties; |
|
204 | } |
|
205 | ||
206 | public function encode($input) |
|
207 | { |
|
208 | $output = []; |
|
209 | foreach ($this->getProperties() as $index => $name) { |
|
210 | if (array_key_exists($name, $input)) { |
|
211 | $output[$index] = $this->convention->encode($this->types[$name], $input[$name]); |
|
212 | } |
|
213 | } |
|
214 | ||
215 | return $output; |
|
216 | } |
|
217 | ||
218 | public function decode($input) |
|
219 | { |
|
@@ 218-228 (lines=11) @@ | ||
215 | return $output; |
|
216 | } |
|
217 | ||
218 | public function decode($input) |
|
219 | { |
|
220 | $output = []; |
|
221 | foreach ($this->getProperties() as $index => $name) { |
|
222 | if (array_key_exists($index, $input)) { |
|
223 | $output[$name] = $this->convention->decode($this->types[$name], $input[$index]); |
|
224 | } |
|
225 | } |
|
226 | ||
227 | return $output; |
|
228 | } |
|
229 | } |
|
230 |