summaryrefslogtreecommitdiff
path: root/app/php
diff options
context:
space:
mode:
Diffstat (limited to 'app/php')
-rw-r--r--app/php/facades/Facade.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/php/facades/Facade.php b/app/php/facades/Facade.php
index d63d22a..9fc2c88 100644
--- a/app/php/facades/Facade.php
+++ b/app/php/facades/Facade.php
@@ -9,7 +9,11 @@ class Facade {
protected $_sqlMap;
protected function __construct() {
- $this->_sqlMap = Prado::getApplication()->getModule('sqlmap')->Client;
+ }
+
+ public function __sleep() {
+ $this->_sqlMap = NULL;
+ return array();
}
public static function getInstance() {
@@ -21,6 +25,9 @@ class Facade {
}
protected function getClient() {
+ if (!$this->_sqlMap) {
+ $this->_sqlMap = Prado::getApplication()->getModule('sqlmap')->Client;
+ }
return $this->_sqlMap;
}