aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib/Service.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-05-07 21:48:26 +0000
committerMario <mario@mariovavti.com>2020-05-07 21:48:26 +0000
commitf132436af3c90cff8dcef852bd836546311036f3 (patch)
tree89531366ba5fc62095981a81a91a2fc52adcad9c /vendor/sabre/xml/lib/Service.php
parentfae70bf0a7f1b566d25e30064f60d58ab150951a (diff)
downloadvolse-hubzilla-f132436af3c90cff8dcef852bd836546311036f3.tar.gz
volse-hubzilla-f132436af3c90cff8dcef852bd836546311036f3.tar.bz2
volse-hubzilla-f132436af3c90cff8dcef852bd836546311036f3.zip
composer updates 2
Diffstat (limited to 'vendor/sabre/xml/lib/Service.php')
-rw-r--r--vendor/sabre/xml/lib/Service.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php
index 882b2dc2c..9a2c47794 100644
--- a/vendor/sabre/xml/lib/Service.php
+++ b/vendor/sabre/xml/lib/Service.php
@@ -61,6 +61,13 @@ class Service
public $classMap = [];
/**
+ * A bitmask of the LIBXML_* constants.
+ *
+ * @var int
+ */
+ public $options = 0;
+
+ /**
* Returns a fresh XML Reader.
*/
public function getReader(): Reader
@@ -107,7 +114,7 @@ class Service
if (is_resource($input)) {
// Unfortunately the XMLReader doesn't support streams. When it
// does, we can optimize this.
- $input = stream_get_contents($input);
+ $input = (string) stream_get_contents($input);
// If input is an empty string, then its safe to throw exception
if ('' === $input) {
@@ -116,7 +123,7 @@ class Service
}
$r = $this->getReader();
$r->contextUri = $contextUri;
- $r->xml($input);
+ $r->XML($input, null, $this->options);
$result = $r->parse();
$rootElementName = $result['name'];
@@ -140,7 +147,6 @@ class Service
*
* @param string|string[] $rootElementName
* @param string|resource $input
- * @param string|null $contextUri
*
* @throws ParseException
*
@@ -151,7 +157,7 @@ class Service
if (is_resource($input)) {
// Unfortunately the XMLReader doesn't support streams. When it
// does, we can optimize this.
- $input = stream_get_contents($input);
+ $input = (string) stream_get_contents($input);
// If input is empty string, then its safe to throw exception
if ('' === $input) {
@@ -160,7 +166,7 @@ class Service
}
$r = $this->getReader();
$r->contextUri = $contextUri;
- $r->xml($input);
+ $r->XML($input, null, $this->options);
$rootElementName = (array) $rootElementName;
@@ -172,7 +178,7 @@ class Service
$result = $r->parse();
if (!in_array($result['name'], $rootElementName, true)) {
- throw new ParseException('Expected '.implode(' or ', (array) $rootElementName).' but received '.$result['name'].' as the root element');
+ throw new ParseException('Expected '.implode(' or ', $rootElementName).' but received '.$result['name'].' as the root element');
}
return $result['value'];
@@ -192,7 +198,7 @@ class Service
* This allows an implementor to easily create URI's relative to the root
* of the domain.
*
- * @param string|array|XmlSerializable $value
+ * @param string|array|object|XmlSerializable $value
*
* @return string
*/