aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/extender.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-25 14:52:36 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-25 14:52:36 +0000
commit0239951ce60d4f4bef878ea6ad9826152e4a4bf5 (patch)
treedd595ed57026150a8085cb3aaabf7db0d59447ae /engine/lib/extender.php
parent2bbed4a0b456ac8ad649e4e02faf4af0e54caaba (diff)
downloadelgg-0239951ce60d4f4bef878ea6ad9826152e4a4bf5.tar.gz
elgg-0239951ce60d4f4bef878ea6ad9826152e4a4bf5.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Using common attribute type var to determine ODD export type for uuid generation, now attributes can support a uuid git-svn-id: https://code.elgg.org/elgg/trunk@529 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/extender.php')
-rw-r--r--engine/lib/extender.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 88542a494..9762526aa 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -18,7 +18,7 @@
* @package Elgg
* @subpackage Core
*/
- abstract class ElggExtender
+ abstract class ElggExtender implements Exportable
{
/**
* This contains the site's main properties (id, etc)
@@ -100,6 +100,21 @@
return can_edit_extender($this->id,$this->type,$user_guid);
}
+ /**
+ * Export this object
+ *
+ * @return array
+ */
+ public function export()
+ {
+ $type = $this->attributes['type'];
+ $uuid = guid_to_uuid($this->entity_guid). $type . "/{$this->id}/";
+
+ $meta = new ODDMetadata($uuid, guid_to_uuid($this->entity_guid), $this->attributes[$name], $this->attributes['value'], $type, guid_to_uuid($this->owner_guid));
+ $meta->setAttribute('published', date("r", $this->time_created));
+
+ return $meta;
+ }
}
/**