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/base_connector.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/base_connector.php')
-rw-r--r-- | codebase/base_connector.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php index 66f1f4c..f21cfc7 100644 --- a/codebase/base_connector.php +++ b/codebase/base_connector.php @@ -284,7 +284,7 @@ class Connector { protected $encoding="utf-8";//!< assigned encoding (UTF-8 by default)
protected $editing=false;//!< flag of edit mode ( response for dataprocessor )
- protected $model=false;
+ public $model=false;
private $updating=false;//!< flag of update mode ( response for data-update )
private $db; //!< db connection resource
@@ -470,9 +470,11 @@ class Connector { $wrap->store();
- if ($this->model && method_exists($this->model, "get"))
- $this->output_as_xml( call_user_func(array($this->model, "get"), $this->request));
- else
+ if ($this->model && method_exists($this->model, "get")){
+ $this->sql = new ArrayDBDataWrapper();
+ $result = new ArrayQueryWrapper(call_user_func(array($this->model, "get"), $this->request));
+ $this->output_as_xml($result);
+ } else
$this->output_as_xml($this->get_resource());
}
}
|