aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMetadata.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-31 00:33:58 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-31 00:33:58 +0000
commit7c8bad89d27b18668622db2a36752653d3f3789c (patch)
tree2732b6296a84cb086f7551e3bf7c205daef8312d /engine/classes/ElggMetadata.php
parentd428c6179cb91fa6c6a6ca739081dfbf79a418b0 (diff)
downloadelgg-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/ElggMetadata.php')
-rw-r--r--engine/classes/ElggMetadata.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php
index 851397a93..24365d4d9 100644
--- a/engine/classes/ElggMetadata.php
+++ b/engine/classes/ElggMetadata.php
@@ -8,6 +8,13 @@
* @subpackage Metadata
*/
class ElggMetadata extends ElggExtender {
+
+ protected function initializeAttributes() {
+ parent::initializeAttributes();
+
+ $this->attributes['type'] = "metadata";
+ }
+
/**
* Construct a new site object, optionally from a given id value or row.
*
@@ -16,7 +23,7 @@ class ElggMetadata extends ElggExtender {
* @return void
*/
function __construct($id = null) {
- $this->attributes = array();
+ $this->initializeAttributes();
if (!empty($id)) {
// Create from db row
@@ -31,7 +38,6 @@ class ElggMetadata extends ElggExtender {
foreach ($objarray as $key => $value) {
$this->attributes[$key] = $value;
}
- $this->attributes['type'] = "metadata";
}
}
}