From 7ddd9521b3f3a397da3b0a6b56238d31414eb4be Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 28 Oct 2010 19:17:36 +0000 Subject: 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 --- engine/classes/ElggPlugin.php | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'engine/classes/ElggPlugin.php') diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 3bbbc02fe..0ea7fdf61 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -5,24 +5,37 @@ * This class is currently a stub, allowing a plugin to * save settings in an object's private settings for each site. * - * @package Elgg.Core + * @package Elgg.Core * @subpackage Plugins.Settings */ class ElggPlugin extends ElggObject { - protected function initialise_attributes() { - parent::initialise_attributes(); - $this->attributes['subtype'] = "plugin"; + /** + * Set subtype to 'plugin' + * + * @return void + */ + protected function initialise_attributes() { + elgg_deprecated_notice('ElggPlugin::initialise_attributes() is deprecated by ::initializeAttributes()', 1.8); + return $this->initializeAttributes(); } - public function __construct($guid = null) { - parent::__construct($guid); + /** + * Set subtype to 'plugin' + * + * @return void + */ + protected function initializeAttributes() { + parent::initializeAttributes(); + + $this->attributes['subtype'] = "plugin"; } /** * Get a value from private settings. * - * @param string $name + * @param string $name Name + * * @return mixed */ public function get($name) { @@ -46,13 +59,15 @@ class ElggPlugin extends ElggObject { /** * Save a value to private settings. * - * @param string $name - * @param mixed $value + * @param string $name Name + * @param mixed $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; } -- cgit v1.2.3