public function getResponseDatabase()
    {
        if ((!$this->_responsesDb) && $this->hasResponseDatabase()) {
            $adapter = $this['responses']['adapter'];

            if (isset($this['responses'], $this['responses']['params'])) {
                $options = $this['responses']['params'];

                if (! isset(
                        $options['charset'],
                        $options['host'],
                        $options['dbname'],
                        $options['username'],
                        $options['password']
                        )) {

                    $db = \Zend_Registry::get('db');

                    if ($db instanceof \Zend_Db_Adapter_Abstract) {
                        $options = $options + $db->getConfig();
                    }
                }
                $this->_responsesDb = \Zend_Db::factory($adapter, $options);
            } else {
                $db = \Zend_Registry::get('db');

                if ($db instanceof \Zend_Db_Adapter_Abstract) {
                    $this->_responsesDb = $db;
                }
            }
        }

        return $this->_responsesDb;
    }