aboutsummaryrefslogtreecommitdiff
path: root/views/json/export/entity.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-25 16:10:20 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-25 16:10:20 +0000
commit84e2ddd9244a70b19e597e8eaee031761f35de06 (patch)
tree5afce73b3555faeb6c625c72fbaf07396250169b /views/json/export/entity.php
parent80462b4952c73923a369dfdbcf82e77cf2f544b9 (diff)
downloadelgg-84e2ddd9244a70b19e597e8eaee031761f35de06.tar.gz
elgg-84e2ddd9244a70b19e597e8eaee031761f35de06.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* JSON & PHP Export modes git-svn-id: https://code.elgg.org/elgg/trunk@537 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/json/export/entity.php')
-rw-r--r--views/json/export/entity.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/views/json/export/entity.php b/views/json/export/entity.php
new file mode 100644
index 000000000..cf7e19c05
--- /dev/null
+++ b/views/json/export/entity.php
@@ -0,0 +1,22 @@
+<?php
+ /**
+ * Elgg Entity export.
+ * Displays an entity as JSON
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ $entity = $vars['entity'];
+
+ $export = new stdClass;
+
+ foreach ($entity as $k => $v)
+ $export->$k = $v;
+
+ echo json_encode($export);
+?> \ No newline at end of file