diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 23:53:57 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 23:53:57 +0000 |
commit | 09f229f4664ed51dfd06d545db2f32bca3b9acf2 (patch) | |
tree | 5e4e745bc103068b1769ab673c84ddf4c5a653fd /engine/classes | |
parent | 1ebe92a96d5543e5d2ddcb1b7ca6e735962aaaef (diff) | |
download | elgg-09f229f4664ed51dfd06d545db2f32bca3b9acf2.tar.gz elgg-09f229f4664ed51dfd06d545db2f32bca3b9acf2.tar.bz2 |
Refs #2597: Pulled Loggable functions with identical implementations into ElggData
git-svn-id: http://code.elgg.org/elgg/trunk@7155 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes')
-rw-r--r-- | engine/classes/ElggData.php | 26 | ||||
-rw-r--r-- | engine/classes/ElggEntity.php | 21 | ||||
-rw-r--r-- | engine/classes/ElggExtender.php | 21 | ||||
-rw-r--r-- | engine/classes/ElggRelationship.php | 21 |
4 files changed, 29 insertions, 60 deletions
diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php index f200a7c21..a206964fa 100644 --- a/engine/classes/ElggData.php +++ b/engine/classes/ElggData.php @@ -1,8 +1,34 @@ <?php abstract class ElggData implements + Loggable, // Can events related to this object class be logged Iterator, // Override foreach behaviour ArrayAccess // Override for array access { + + + + /* + * SYSTEM LOG INTERFACE + */ + + /** + * Return the class name of the object. + * + * @return string + */ + public function getClassName() { + return get_class($this); + } + + /** + * Return the GUID of the owner of this object. + * + * @return int + */ + public function getObjectOwnerGUID() { + return $this->owner_guid; + } + /** * The main attributes of an entity. * Holds attributes to save to database diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 56ac96f8f..9b6b04899 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -30,8 +30,7 @@ abstract class ElggEntity extends ElggData implements Notable, // Calendar interface Locatable, // Geocoding interface Exportable, // Allow export of data - Importable, // Allow import of data - Loggable // Can events related to this object class be logged + Importable // Allow import of data { /** @@ -1303,15 +1302,6 @@ abstract class ElggEntity extends ElggData implements } /** - * Return the class name of the object. - * - * @return string - */ - public function getClassName() { - return get_class($this); - } - - /** * For a given ID, return the object associated with it. * This is used by the river functionality primarily. * @@ -1329,15 +1319,6 @@ abstract class ElggEntity extends ElggData implements } /** - * Returns the GUID of the owner of this entity. - * - * @return int Owner guid - */ - public function getObjectOwnerGUID() { - return $this->owner_guid; - } - - /** * Returns tags for this entity. * * @warning Tags must be registered by {@link elgg_register_tag_metadata_name()}. diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php index d6ea14ba8..ca92dca74 100644 --- a/engine/classes/ElggExtender.php +++ b/engine/classes/ElggExtender.php @@ -18,8 +18,7 @@ * @see ElggMetadata */ abstract class ElggExtender extends ElggData implements - Exportable, - Loggable // Can events related to this object class be logged + Exportable { /** @@ -187,24 +186,6 @@ abstract class ElggExtender extends ElggData implements } /** - * Return the class name of the object. - * - * @return string - */ - public function getClassName() { - return get_class($this); - } - - /** - * Return the GUID of the owner of this object. - * - * @return int - */ - public function getObjectOwnerGUID() { - return $this->owner_guid; - } - - /** * Return a type of extension. * * @return string diff --git a/engine/classes/ElggRelationship.php b/engine/classes/ElggRelationship.php index e2b0e4e13..4dcdb6297 100644 --- a/engine/classes/ElggRelationship.php +++ b/engine/classes/ElggRelationship.php @@ -7,8 +7,7 @@ */ class ElggRelationship extends ElggData implements Importable, - Exportable, - Loggable // Can events related to this object class be logged + Exportable { /** @@ -191,15 +190,6 @@ class ElggRelationship extends ElggData implements } /** - * Return the class name of the object. - * - * @return string - */ - public function getClassName() { - return get_class($this); - } - - /** * For a given ID, return the object associated with it. * This is used by the river functionality primarily. * This is useful for checking access permissions etc on objects. @@ -213,15 +203,6 @@ class ElggRelationship extends ElggData implements } /** - * Return the GUID of the owner of this object. - * - * @return int - */ - public function getObjectOwnerGUID() { - return $this->owner_guid; - } - - /** * Return a type of the object - eg. object, group, user, relationship, metadata, annotation etc * * @return string 'relationship' |