diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 17:41:50 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 17:41:50 +0000 |
commit | faf079af4ddc0f35fc2b5835c20f184b4c93e303 (patch) | |
tree | 8909cfa7f9a221ff17dacc451b80f6f706e54dad /engine/classes/ElggData.php | |
parent | 9abd6ad3de13d4a5a6c6f00a216d6310d6df4cc0 (diff) | |
download | elgg-faf079af4ddc0f35fc2b5835c20f184b4c93e303.tar.gz elgg-faf079af4ddc0f35fc2b5835c20f184b4c93e303.tar.bz2 |
Fixes #2629: Pulled old initialise_attributes() into ElggData and added a default param to emit a deprecation notice if called.
git-svn-id: http://code.elgg.org/elgg/trunk@7387 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggData.php')
-rw-r--r-- | engine/classes/ElggData.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php index a904cb923..2853a5298 100644 --- a/engine/classes/ElggData.php +++ b/engine/classes/ElggData.php @@ -24,6 +24,27 @@ abstract class ElggData implements protected $attributes = array(); /** + * Initialise the attributes array. + * + * This is vital to distinguish between metadata and base parameters. + * + * @param bool $pre18_api Compatibility for subclassing in 1.7 -> 1.8 change. + * Passing true (default) emits a deprecation notice. + * Passing false returns false. Core constructors always pass false. + * Does nothing either way since attributes are initialized by the time + * this is called. + * @return false|void False is + * @deprecated 1.8 Use initializeAttributes() + */ + protected function initialise_attributes($pre18_api = true) { + if ($pre18_api) { + elgg_deprecated_notice('initialise_attributes() is deprecated by initializeAttributes()', 1.8); + } else { + return false; + } + } + + /** * Initialize the attributes array. * * This is vital to distinguish between metadata and base parameters. |