diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-31 00:33:58 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-31 00:33:58 +0000 |
commit | 7c8bad89d27b18668622db2a36752653d3f3789c (patch) | |
tree | 2732b6296a84cb086f7551e3bf7c205daef8312d /engine/classes/ElggAnnotation.php | |
parent | d428c6179cb91fa6c6a6ca739081dfbf79a418b0 (diff) | |
download | elgg-7c8bad89d27b18668622db2a36752653d3f3789c.tar.gz elgg-7c8bad89d27b18668622db2a36752653d3f3789c.tar.bz2 |
Improved initializeAttributes implementations
git-svn-id: http://code.elgg.org/elgg/trunk@7159 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggAnnotation.php')
-rw-r--r-- | engine/classes/ElggAnnotation.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engine/classes/ElggAnnotation.php b/engine/classes/ElggAnnotation.php index cdcfe363f..d99f5fc9a 100644 --- a/engine/classes/ElggAnnotation.php +++ b/engine/classes/ElggAnnotation.php @@ -14,13 +14,19 @@ */ class ElggAnnotation extends ElggExtender { + protected function initializeAttributes() { + parent::initializeAttributes(); + + $this->attributes['type'] = 'annotation'; + } + /** * Construct a new annotation, optionally from a given id value or db object. * * @param mixed $id The annotation ID */ function __construct($id = null) { - $this->attributes = array(); + $this->initializeAttributes(); if (!empty($id)) { if ($id instanceof stdClass) { @@ -35,8 +41,6 @@ class ElggAnnotation extends ElggExtender { foreach ($objarray as $key => $value) { $this->attributes[$key] = $value; } - - $this->attributes['type'] = "annotation"; } } } |