diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggData.php | 19 | ||||
-rw-r--r-- | engine/classes/ElggEntity.php | 18 | ||||
-rw-r--r-- | engine/classes/ElggExtender.php | 19 |
3 files changed, 17 insertions, 39 deletions
diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php index a206964fa..b21646df1 100644 --- a/engine/classes/ElggData.php +++ b/engine/classes/ElggData.php @@ -4,8 +4,23 @@ abstract class ElggData implements 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 diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 9b6b04899..5d0e030fc 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -731,24 +731,6 @@ abstract class ElggEntity extends ElggData implements } /** - * 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 string Entity type diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php index ca92dca74..2c2669e28 100644 --- a/engine/classes/ElggExtender.php +++ b/engine/classes/ElggExtender.php @@ -76,25 +76,6 @@ abstract class ElggExtender extends ElggData implements } /** - * 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. * * @return ElggEntity The enttiy |