|
@@ 200-205 (lines=6) @@
|
| 197 |
|
return json_decode($input, true); |
| 198 |
|
}); |
| 199 |
|
|
| 200 |
|
$this->registerMediaTypeParser('application/xml', function ($input) { |
| 201 |
|
$backup = libxml_disable_entity_loader(true); |
| 202 |
|
$result = simplexml_load_string($input); |
| 203 |
|
libxml_disable_entity_loader($backup); |
| 204 |
|
return $result; |
| 205 |
|
}); |
| 206 |
|
|
| 207 |
|
$this->registerMediaTypeParser('text/xml', function ($input) { |
| 208 |
|
$backup = libxml_disable_entity_loader(true); |
|
@@ 207-212 (lines=6) @@
|
| 204 |
|
return $result; |
| 205 |
|
}); |
| 206 |
|
|
| 207 |
|
$this->registerMediaTypeParser('text/xml', function ($input) { |
| 208 |
|
$backup = libxml_disable_entity_loader(true); |
| 209 |
|
$result = simplexml_load_string($input); |
| 210 |
|
libxml_disable_entity_loader($backup); |
| 211 |
|
return $result; |
| 212 |
|
}); |
| 213 |
|
|
| 214 |
|
$this->registerMediaTypeParser('application/x-www-form-urlencoded', function ($input) { |
| 215 |
|
parse_str($input, $data); |