diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-28 19:17:36 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-28 19:17:36 +0000 |
commit | 7ddd9521b3f3a397da3b0a6b56238d31414eb4be (patch) | |
tree | 6eb6a9a51db5fa0f5d3cc2ec6de29b9e258b12a1 /engine/classes/ElggWidget.php | |
parent | bd3484417d170e62bc94e9db81d4ad37e8ddee6a (diff) | |
download | elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.gz elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.bz2 |
Standardized code in all of core, not including language files, tests, or core mods.
git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggWidget.php')
-rw-r--r-- | engine/classes/ElggWidget.php | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php index 30cbc7dc2..c9a65967c 100644 --- a/engine/classes/ElggWidget.php +++ b/engine/classes/ElggWidget.php @@ -2,20 +2,42 @@ /** * Override ElggObject in order to store widget data in ultra-private stores. + * + * @package Elgg.Core + * @subpackage Widgets */ class ElggWidget extends ElggObject { + + /** + * Set subtype to widget. + * + * @deprecated 1.8 use ElggWidget::initializeAttributes() + * + * @return void + */ protected function initialise_attributes() { - parent::initialise_attributes(); + elgg_deprecated_notice('ElggWidget::initialise_attributes() is deprecated by ::initializeAttributes()', 1.8); - $this->attributes['subtype'] = "widget"; + return $this->initializeAttributes(); } - public function __construct($guid = null) { - parent::__construct($guid); + /** + * Set subtype to widget. + * + * @return void + */ + protected function initializeAttributes() { + parent::initializeAttributes(); + + $this->attributes['subtype'] = "widget"; } /** * Override entity get and sets in order to save data to private data store. + * + * @param string $name Name + * + * @return mixed */ public function get($name) { // See if its in our base attribute @@ -35,11 +57,16 @@ class ElggWidget extends ElggObject { /** * Override entity get and sets in order to save data to private data store. + * + * @param string $name Name + * @param string $value Value + * + * @return bool */ public function set($name, $value) { if (array_key_exists($name, $this->attributes)) { // Check that we're not trying to change the guid! - if ((array_key_exists('guid', $this->attributes)) && ($name=='guid')) { + if ((array_key_exists('guid', $this->attributes)) && ($name == 'guid')) { return false; } |