Example #1
0
 /**
  * 
  * @access 	protected
  * @param 	App_Model_DbTable_Abstract $dbTable
  * @param 	array $where
  * @return 	Zend_Db_Table_Row
  */
 protected function _simpleFetchRow(App_Model_DbTable_Abstract $dbTable, array $where = null)
 {
     if (is_null($where)) {
         $where = array();
         if (!empty($this->_data)) {
             foreach ($this->_data as $key => $value) {
                 $where[$key . ' = ?'] = $value;
             }
         } else {
             throw new Exception('Clausula where is not defined');
         }
     }
     return $dbTable->fetchRow($where);
 }