diff options
Diffstat (limited to 'engine/classes/ODDEntity.php')
-rw-r--r-- | engine/classes/ODDEntity.php | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/engine/classes/ODDEntity.php b/engine/classes/ODDEntity.php new file mode 100644 index 000000000..30da5f37f --- /dev/null +++ b/engine/classes/ODDEntity.php @@ -0,0 +1,60 @@ +<?php
+
+/**
+ * ODD Entity class.
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ */
+class ODDEntity extends ODD {
+ function __construct($uuid, $class, $subclass = "") {
+ parent::__construct();
+
+ $this->setAttribute('uuid', $uuid);
+ $this->setAttribute('class', $class);
+ $this->setAttribute('subclass', $subclass);
+ }
+
+ protected function getTagName() { return "entity"; }
+}
+
+/**
+ * ODD Metadata class.
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ */
+class ODDMetaData extends ODD {
+ function __construct($uuid, $entity_uuid, $name, $value, $type = "", $owner_uuid = "") {
+ parent::__construct();
+
+ $this->setAttribute('uuid', $uuid);
+ $this->setAttribute('entity_uuid', $entity_uuid);
+ $this->setAttribute('name', $name);
+ $this->setAttribute('type', $type);
+ $this->setAttribute('owner_uuid', $owner_uuid);
+ $this->setBody($value);
+ }
+
+ protected function getTagName() {
+ return "metadata";
+ }
+}
+
+/**
+ * ODD Relationship class.
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ */
+class ODDRelationship extends ODD {
+ function __construct($uuid1, $type, $uuid2) {
+ parent::__construct();
+
+ $this->setAttribute('uuid1', $uuid1);
+ $this->setAttribute('type', $type);
+ $this->setAttribute('uuid2', $uuid2);
+ }
+
+ protected function getTagName() { return "relationship"; }
+}
\ No newline at end of file |