summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/class/object.class.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/class/object.class.php b/app/class/object.class.php
index ee3dc21..1fbe923 100644
--- a/app/class/object.class.php
+++ b/app/class/object.class.php
@@ -75,6 +75,34 @@ class object extends table
}
/*
+ * Update the owner of this object
+ */
+ public function setOwner(agent $owner) : void
+ {
+ $this->owner = $owner->guid;
+ }
+
+ /*
+ * Get the parent of this object. If this object does not have a
+ * parent, NULL will be returned.
+ */
+ public function getParent() : ?object
+ {
+ if (!isset($this->parent) || $this->parent == "")
+ return NULL;
+
+ return new object($this->parent);
+ }
+
+ /*
+ * Update the parent of this object
+ */
+ public function setParent(object $parent) : void
+ {
+ $this->parent = $parent->guid;
+ }
+
+ /*
* Get an array of all members of this object
*/
public function getMembers() : array