getServiceManager()->get('Config'); $config_local = $configService->get("local.php"); if(is_array($param) && count($param)>0) { $this->db = new Adapter($param); }else{ $this->db = new Adapter(array( 'driver' => $config_local->db->driver, 'hostname' => $config_local->db->hostname, 'port' => $config_local->db->port, 'database' => $config_local->db->database, 'username' => $config_local->db->username, 'password' => $config_local->db->password )); } $db = $this->db; } public function getAdapter() { return $this->db; } public function setConfig() { } }