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