I thought this would be OK even though relationships don't technically have owners because ElggRelationship implemented the getObectOwnerGUID method
git-svn-id: http://code.elgg.org/elgg/trunk@7156
36083f99-b078-4883-b0ff-
0f9b5a30f544
Iterator, // Override foreach behaviour
ArrayAccess // Override for array access
{
-
-
+ /**
+ * Return the guid of the entity's owner.
+ *
+ * @return int The owner GUID
+ */
+ public function getOwner() {
+ return $this->owner_guid;
+ }
+
+ /**
+ * Returns the ElggEntity or child object of the owner of the entity.
+ *
+ * @return ElggEntity The owning user
+ */
+ public function getOwnerEntity() {
+ return get_entity($this->getOwner());
+ }
/*
* SYSTEM LOG INTERFACE
return $this->get('guid');
}
- /**
- * Return the guid of the entity's owner.
- *
- * @return int The owner GUID
- */
- public function getOwner() {
- return $this->get('owner_guid');
- }
-
- /**
- * Returns the ElggEntity or child object of the owner of the entity.
- *
- * @return ElggEntity The owning user
- */
- public function getOwnerEntity() {
- return get_entity($this->get('owner_guid'));
- }
-
/**
* Returns the entity type
*
return true;
}
- /**
- * Return the owner guid of this extender.
- *
- * @return int
- */
- public function getOwner() {
- return $this->owner_guid;
- }
-
- /**
- * Return the owner entity.
- *
- * @return ElggEntity|false
- * @since 1.7.0
- */
- public function getOwnerEntity() {
- return get_user($this->owner_guid);
- }
-
/**
* Return the entity this describes.
*