summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/ibase/ibase_result.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-08 21:43:22 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-08 21:43:22 +0200
commitadedaf05449112a5ede4a3bc722a9a153b4aa2a3 (patch)
treed9e6a538e140b5076a926151bbe261a960e84417 /system/database/drivers/ibase/ibase_result.php
parentbd6116a63899c5efcf35e175b3db14b1f05c60a9 (diff)
parent0db81b6c82c2f86a6e9da26ab5501ba65cb4c4e1 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/db_subdrivers
Diffstat (limited to 'system/database/drivers/ibase/ibase_result.php')
-rw-r--r--system/database/drivers/ibase/ibase_result.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/system/database/drivers/ibase/ibase_result.php b/system/database/drivers/ibase/ibase_result.php
index fdf74096f..95e55710b 100644
--- a/system/database/drivers/ibase/ibase_result.php
+++ b/system/database/drivers/ibase/ibase_result.php
@@ -128,11 +128,25 @@ class CI_DB_ibase_result extends CI_DB_result {
*
* Returns the result set as an object
*
+ * @param string
* @return object
*/
- protected function _fetch_object()
+ protected function _fetch_object($class_name = 'stdClass')
{
- return @ibase_fetch_object($this->result_id, IBASE_FETCH_BLOBS);
+ $row = @ibase_fetch_object($this->result_id, IBASE_FETCH_BLOBS);
+
+ if ($class_name === 'stdClass' OR ! $row)
+ {
+ return $row;
+ }
+
+ $class_name = new $class_name();
+ foreach ($row as $key => $value)
+ {
+ $class_name->$key = $value;
+ }
+
+ return $class_name;
}
}