[Pkg-owncloud-commits] [php-sabre-vobject] 48/341: !xml Add helper for the XML parser.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 11076ef5eecb79b60f1c5fffc58de06c95a4d83d
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Wed Nov 12 15:22:42 2014 +0100
!xml Add helper for the XML parser.
---
lib/Reader.php | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/lib/Reader.php b/lib/Reader.php
index 115111e..e7cd009 100644
--- a/lib/Reader.php
+++ b/lib/Reader.php
@@ -70,4 +70,25 @@ class Reader {
}
+ /**
+ * Parses a xCard or xCal object, and returns the top component.
+ *
+ * The options argument is a bitfield. Pass any of the OPTIONS constant to
+ * alter the parsers' behaviour.
+ *
+ * You can either supply a string, or a readable stream for input.
+ *
+ * @param string|resource $data
+ * @param int $options
+ * @return Document
+ */
+ static public function readXML($data, $options = 0) {
+
+ $parser = new Parser\XML();
+ $result = $parser->parse($data, $options);
+
+ return $result;
+
+ }
+
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list