diff options
author | Stanislav-Wolski <stanislau.wolski@gmail.com> | 2012-05-22 17:41:19 +0300 |
---|---|---|
committer | Stanislav-Wolski <stanislau.wolski@gmail.com> | 2012-05-22 17:41:19 +0300 |
commit | fc6240c00fb8acba8700749ebb2b2e40dd85fc41 (patch) | |
tree | 52952a7d3815006c856a00496f3b430fb1b94cd1 /codebase/db_common.php | |
parent | 8bb27b287fc8d51e628f4f99ee651643c9eb8369 (diff) | |
download | connector-php-fc6240c00fb8acba8700749ebb2b2e40dd85fc41.zip connector-php-fc6240c00fb8acba8700749ebb2b2e40dd85fc41.tar.gz connector-php-fc6240c00fb8acba8700749ebb2b2e40dd85fc41.tar.bz2 |
[update] better model support for codeigniter
Diffstat (limited to 'codebase/db_common.php')
-rw-r--r-- | codebase/db_common.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/codebase/db_common.php b/codebase/db_common.php index 996feda..7d738ee 100644 --- a/codebase/db_common.php +++ b/codebase/db_common.php @@ -924,6 +924,29 @@ abstract class DBDataWrapper extends DataWrapper{ } } + +class ArrayDBDataWrapper extends DBDataWrapper{ + public function get_next($res){ + if ($res->index < sizeof($res->data)) + return $res->data[$res->index++]; + } + public function query($sql){ + throw new Exception("Not implemented"); + } + public function escape($value){ + throw new Exception("Not implemented"); + } + public function get_new_id(){ + throw new Exception("Not implemented"); + } +} + +class ArrayQueryWrapper{ + public function __construct($data){ + $this->data = $data; + $this->index = 0; + } +} /*! Implementation of DataWrapper for MySQL **/ class MySQLDBDataWrapper extends DBDataWrapper{ |