upgrade to sabre32

This commit is contained in:
Mario Vavti
2016-05-28 17:46:24 +02:00
parent ac4688eac0
commit 66effbfe08
228 changed files with 10088 additions and 8576 deletions

View File

@@ -151,8 +151,14 @@ class Service {
$r->contextUri = $contextUri;
$r->xml($input);
$rootElementName = (array)$rootElementName;
foreach ($rootElementName as &$rEl) {
if ($rEl[0] !== '{') $rEl = '{}' . $rEl;
}
$result = $r->parse();
if (!in_array($result['name'], (array)$rootElementName, true)) {
if (!in_array($result['name'], $rootElementName, true)) {
throw new ParseException('Expected ' . implode(' or ', (array)$rootElementName) . ' but received ' . $result['name'] . ' as the root element');
}
return $result['value'];