From 95740405456f72d6d222b08a7b366e5559835ccf Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sun, 14 Nov 2010 06:20:49 +0000 Subject: Added comments to several undocumented methods git-svn-id: http://code.elgg.org/elgg/trunk@7305 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggData.php | 48 +++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'engine/classes/ElggData.php') diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php index 4591c499d..96de1bc8f 100644 --- a/engine/classes/ElggData.php +++ b/engine/classes/ElggData.php @@ -1,11 +1,18 @@ attributes)) { $this->attributes = array(); } - + $this->attributes['time_created'] = ''; } @@ -54,7 +61,7 @@ abstract class ElggData implements public function __set($name, $value) { return $this->set($name, $value); } - + /** * Test if property is set either as an attribute or metadata. * @@ -67,32 +74,47 @@ abstract class ElggData implements function __isset($name) { return $this->$name !== NULL; } - + + /** + * Fetch the specified attribute + * + * @param string $name The attribute to fetch + * + * @return mixed The attribute, if it exists. Otherwise, null. + */ abstract protected function get($name); - + + /** + * Set the specified attribute + * + * @param string $name The attribute to set + * @param mixed $value The value to set it to + * + * @return The success of your set funtion? + */ abstract protected function set($name, $value); - + /** * Get a URL for this object - * + * * @return string */ abstract public function getURL(); - + /** * Save this data to the appropriate database table. * * @return bool */ abstract public function save(); - + /** * Delete this data. * * @return bool */ abstract public function delete(); - + /** * Returns the UNIX epoch time that this entity was created * @@ -101,7 +123,7 @@ abstract class ElggData implements public function getTimeCreated() { return $this->time_created; } - + /* * SYSTEM LOG INTERFACE */ @@ -122,7 +144,7 @@ abstract class ElggData implements * @deprecated 1.8 Use getOwner() instead */ public function getObjectOwnerGUID() { - elgg_deprecated_notice("The method getObjectOwnerGUID() was deprecated in Elgg 1.8. Use getOwner() instead.", 1.8); + elgg_deprecated_notice("getObjectOwnerGUID() was deprecated. Use getOwner().", 1.8); return $this->owner_guid; } -- cgit v1.2.3