public function getDbTable ($dbTable = null, $primary = null) {
if (null != $dbTable) $this->_dbObject = new Widgets_DbTable($dbTable, $primary);
if (!($this->_dbObject instanceof Zend_Db_Table_Abstract)) throw new Exception('Invalid table data gateway provided');
if ($this->_dbObject->getAdapter() instanceof Zend_Db_Adapter_Pdo_Mysql) {
if ($this->_dbCharset) $this->_dbObject->getAdapter()->query("SET character_set_connection={$this->_dbCharset},character_set_results={$this->_dbCharset},character_set_client=binary");
}
return $this->_dbObject;
}
public function getAdapter () {
return $this->getDbTable()->getAdapter();
}