Rewrote the static call to dynamic
authorRoland Häder <roland@mxchange.org>
Sat, 9 Feb 2013 18:39:13 +0000 (18:39 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 9 Feb 2013 18:39:13 +0000 (18:39 +0000)
inc/classes/main/database/class_BaseDatabaseWrapper.php
inc/config.php

index 357be67..63d121c 100644 (file)
@@ -176,7 +176,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                }
 
                // Create an instance of a DatabaseResult class with the given result
-               $resultInstance = DatabaseResult::createDatabaseResult($result);
+               $resultInstance = ObjectFactory::createObjectByConfiguredName('database_result_class', array($result));
 
                // And return the instance
                return $resultInstance;
index 21c0270..bb0defe 100644 (file)
@@ -170,6 +170,9 @@ $cfg->setConfigEntry('update_criteria_class', 'UpdateCriteria');
 // CFG: FILE-IO-CLASS
 $cfg->setConfigEntry('file_io_class', 'FileIoHandler');
 
+// CFG: DATABASE-RESULT-CLASS
+$cfg->setConfigEntry('database_result_class', 'DatabaseResult');
+
 // CFG: FILTER-CHAIN-CLASS
 $cfg->setConfigEntry('filter_chain_class', 'FilterChain');