aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggPlugin.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-28 19:17:36 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-28 19:17:36 +0000
commit7ddd9521b3f3a397da3b0a6b56238d31414eb4be (patch)
tree6eb6a9a51db5fa0f5d3cc2ec6de29b9e258b12a1 /engine/classes/ElggPlugin.php
parentbd3484417d170e62bc94e9db81d4ad37e8ddee6a (diff)
downloadelgg-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/ElggPlugin.php')
-rw-r--r--engine/classes/ElggPlugin.php35
1 files changed, 25 insertions, 10 deletions
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;
}