change Db object import function in Account module

This commit is contained in:
Jianxuan Li 2015-01-25 17:19:22 +08:00
parent 92de95cf58
commit 9361b1ba9b
3 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ class Account implements EventManagerAwareInterface
function __construct() function __construct()
{ {
$this->db = new Db(); $this->db = Db::getInstance();
$this->config = Config::get(); $this->config = Config::get();
$Listener = new Listener(); $Listener = new Listener();
@ -173,8 +173,8 @@ class Account implements EventManagerAwareInterface
{ {
$auth = new AuthenticationService(); $auth = new AuthenticationService();
$auth->setStorage(new SessionStorage($this->config->session_namespace)); $auth->setStorage(new SessionStorage($this->config->session_namespace));
new Zend_Db($dbAdapter); $dbAdapter = Zend_Db::getInstance();
$authAdapter = new \Zend\Authentication\Adapter\DbTable( $authAdapter = new \Zend\Authentication\Adapter\DbTable(
$dbAdapter, $dbAdapter,

View File

@ -19,7 +19,7 @@ class LoginHandle
function __construct() function __construct()
{ {
$this->db = new Db(); $this->db = Db::getInstance();
} }
public function checkParam(EventInterface $e){ public function checkParam(EventInterface $e){

View File

@ -21,7 +21,7 @@ class RegisterHandle
function __construct($db = NULL) function __construct($db = NULL)
{ {
$this->db = new Db(); $this->db = Db::getInstance();
$this->config = Config::get(); $this->config = Config::get();
} }