aboutsummaryrefslogtreecommitdiff
path: root/views/xml
diff options
context:
space:
mode:
Diffstat (limited to 'views/xml')
-rw-r--r--views/xml/api/output.php14
-rw-r--r--views/xml/messages/exceptions/exception.php25
-rw-r--r--views/xml/page/default.php14
-rw-r--r--views/xml/xml-rpc/output.php11
4 files changed, 64 insertions, 0 deletions
diff --git a/views/xml/api/output.php b/views/xml/api/output.php
new file mode 100644
index 000000000..42afd44bb
--- /dev/null
+++ b/views/xml/api/output.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Elgg XML output
+ * This outputs the api as XML
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+$result = $vars['result'];
+$export = $result->export();
+
+echo serialise_object_to_xml($export, "elgg"); \ No newline at end of file
diff --git a/views/xml/messages/exceptions/exception.php b/views/xml/messages/exceptions/exception.php
new file mode 100644
index 000000000..66a0f2b96
--- /dev/null
+++ b/views/xml/messages/exceptions/exception.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] An exception
+ */
+
+?>
+<!--
+<?php echo get_class($vars['object']); ?>: <?php echo elgg_autop($vars['object']->getMessage()); ?>
+
+
+<?php if (elgg_get_config('debug')) { ?>
+<?php
+
+ echo print_r($vars['object'], true);
+
+ ?>
+<?php } ?>
+
+--> \ No newline at end of file
diff --git a/views/xml/page/default.php b/views/xml/page/default.php
new file mode 100644
index 000000000..0f0aecbe4
--- /dev/null
+++ b/views/xml/page/default.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Elgg XML output pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+header("Content-Type: text/xml");
+// web server will handle setting the content length
+//header("Content-Length: " . strlen($vars['body']));
+echo "<?xml version='1.0' encoding='UTF-8'?>\n";
+echo $vars['body']; \ No newline at end of file
diff --git a/views/xml/xml-rpc/output.php b/views/xml/xml-rpc/output.php
new file mode 100644
index 000000000..4276029d1
--- /dev/null
+++ b/views/xml/xml-rpc/output.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Elgg XML output for XML-RPC
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$result = $vars['result'];
+
+echo "$result"; \ No newline at end of file