diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/json/export/entity.php | 22 | ||||
-rw-r--r-- | views/json/export/metadata.php | 22 | ||||
-rw-r--r-- | views/json/export/relationship.php | 22 | ||||
-rw-r--r-- | views/php/export/entity.php | 16 | ||||
-rw-r--r-- | views/php/export/metadata.php | 16 | ||||
-rw-r--r-- | views/php/export/relationship.php | 16 |
6 files changed, 114 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 diff --git a/views/json/export/metadata.php b/views/json/export/metadata.php new file mode 100644 index 000000000..30caf8b85 --- /dev/null +++ b/views/json/export/metadata.php @@ -0,0 +1,22 @@ +<?php + /** + * Elgg metadata export. + * Displays a metadata item using 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/ + */ + + $m = $vars['metadata']; + + $export = new stdClass; + + foreach ($m as $k => $v) + $export->$k = $v; + + echo json_encode($export); +?>
\ No newline at end of file diff --git a/views/json/export/relationship.php b/views/json/export/relationship.php new file mode 100644 index 000000000..e582cc898 --- /dev/null +++ b/views/json/export/relationship.php @@ -0,0 +1,22 @@ +<?php + /** + * Elgg relationship export. + * Displays a relationship using 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/ + */ + + $r = $vars['relationship']; + + $export = new stdClass; + + foreach ($r as $k => $v) + $export->$k = $v; + + echo json_encode($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..161401620 --- /dev/null +++ b/views/php/export/entity.php @@ -0,0 +1,16 @@ +<?php + /** + * Elgg Entity export. + * Displays an entity as PHP serialised data + * + * @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']; + echo serialize($entity); +?>
\ No newline at end of file diff --git a/views/php/export/metadata.php b/views/php/export/metadata.php new file mode 100644 index 000000000..4f5e9c333 --- /dev/null +++ b/views/php/export/metadata.php @@ -0,0 +1,16 @@ +<?php + /** + * Elgg metadata export. + * Displays a metadata item using PHP serialised data + * + * @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/ + */ + + $m = $vars['metadata']; + echo serialize($m); +?>
\ 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..cdba1b7a9 --- /dev/null +++ b/views/php/export/relationship.php @@ -0,0 +1,16 @@ +<?php + /** + * Elgg relationship export. + * Displays a relationship using PHP serialised data + * + * @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/ + */ + + $r = $vars['relationship']; + echo serialize($r); +?>
\ No newline at end of file |