Zend_Db_Table_Abstract::getAdapter PHP Method

getAdapter() public method

Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Table object.
public getAdapter ( ) : Zend_Db_Adapter_Abstract
return Zend_Db_Adapter_Abstract
    public function getAdapter()
    {
        return $this->_db;
    }

Usage Example

 /**
  * Get configured database adapter
  * 
  * @return Zend_Db_Adapter_Abstract
  */
 public function getDbAdapter()
 {
     if (null === $this->_dbAdapter) {
         if ($this->_dbTable instanceof Zend_Db_Table_Abstract) {
             $this->_dbAdapter = $this->_dbTable->getAdapter();
         } else {
             throw new Engine_ServiceLocator_Exception('Database adapter not configured');
         }
     }
     return $this->_dbAdapter;
 }
All Usage Examples Of Zend_Db_Table_Abstract::getAdapter