1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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"; }
}
|