aboutsummaryrefslogtreecommitdiff
path: root/views/php
diff options
context:
space:
mode:
Diffstat (limited to 'views/php')
-rw-r--r--views/php/api/output.php13
-rw-r--r--views/php/export/entity.php19
-rw-r--r--views/php/export/metadata.php19
-rw-r--r--views/php/export/relationship.php19
-rw-r--r--views/php/group/default.php9
-rw-r--r--views/php/messages/exceptions/exception.php12
-rw-r--r--views/php/object/default.php9
-rw-r--r--views/php/page/default.php9
-rw-r--r--views/php/site/default.php9
-rw-r--r--views/php/user/default.php9
10 files changed, 127 insertions, 0 deletions
diff --git a/views/php/api/output.php b/views/php/api/output.php
new file mode 100644
index 000000000..14259564c
--- /dev/null
+++ b/views/php/api/output.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Elgg PHP output
+ * This outputs the api results as serialized PHP
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$result = $vars['result'];
+$export = $result->export();
+
+echo serialize($export); \ No newline at end of file
diff --git a/views/php/export/entity.php b/views/php/export/entity.php
new file mode 100644
index 000000000..d2bcc0d58
--- /dev/null
+++ b/views/php/export/entity.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg Entity export.
+ * Displays an entity as PHP serialised data
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$entity = $vars['entity'];
+
+$export = new stdClass;
+$exportable_values = $entity->getExportableValues();
+
+foreach ($exportable_values as $v) {
+ $export->$v = $entity->$v;
+}
+
+echo serialize($export);
diff --git a/views/php/export/metadata.php b/views/php/export/metadata.php
new file mode 100644
index 000000000..90f1daeb5
--- /dev/null
+++ b/views/php/export/metadata.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg metadata export.
+ * Displays a metadata item using PHP serialised data
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$m = $vars['metadata'];
+
+$export = new stdClass;
+$exportable_values = $m->getExportableValues();
+
+foreach ($exportable_values as $v) {
+ $export->$v = $m->$v;
+}
+
+echo serialize($export); \ No newline at end of file
diff --git a/views/php/export/relationship.php b/views/php/export/relationship.php
new file mode 100644
index 000000000..691e63067
--- /dev/null
+++ b/views/php/export/relationship.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg relationship export.
+ * Displays a relationship using PHP serialised data
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$r = $vars['relationship'];
+
+$export = new stdClass;
+$exportable_values = $r->getExportableValues();
+
+foreach ($exportable_values as $v) {
+ $export->$v = $r->$v;
+}
+
+echo serialize($export); \ No newline at end of file
diff --git a/views/php/group/default.php b/views/php/group/default.php
new file mode 100644
index 000000000..968d68bcd
--- /dev/null
+++ b/views/php/group/default.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * PHP group view
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view('export/entity', $vars); \ No newline at end of file
diff --git a/views/php/messages/exceptions/exception.php b/views/php/messages/exceptions/exception.php
new file mode 100644
index 000000000..195e9dfd4
--- /dev/null
+++ b/views/php/messages/exceptions/exception.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] An exception
+ */
+
+echo serialize($vars['object']); \ No newline at end of file
diff --git a/views/php/object/default.php b/views/php/object/default.php
new file mode 100644
index 000000000..8cf4eb8c6
--- /dev/null
+++ b/views/php/object/default.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * PHP object view
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view('export/entity', $vars); \ No newline at end of file
diff --git a/views/php/page/default.php b/views/php/page/default.php
new file mode 100644
index 000000000..87211a462
--- /dev/null
+++ b/views/php/page/default.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * PHP output pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo $vars['body']; \ No newline at end of file
diff --git a/views/php/site/default.php b/views/php/site/default.php
new file mode 100644
index 000000000..102ac7ec7
--- /dev/null
+++ b/views/php/site/default.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * PHP site view
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+elgg_view('export/entity', $vars); \ No newline at end of file
diff --git a/views/php/user/default.php b/views/php/user/default.php
new file mode 100644
index 000000000..1bb0f8fa9
--- /dev/null
+++ b/views/php/user/default.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * PHP user view
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+echo elgg_view('export/entity', $vars); \ No newline at end of file