_tableClass = 'Table_' . array_pop($class) . 's'; // le 's' final parent::__construct($input); $cols = $this->_table->info(Zend_Db_Table_Abstract::COLS); if (!isset($input['data'])) { $input['data'] = array_combine($cols, array_pad(array(),count($cols),null)); } $this->_data = $input['data']; } public function getForm($form = null) { $formObject = $this->getTable()->getForm($form); if ($this->_data[$this->_primary[1]] != null && $form == null) { $formObject->populate($this->_data); } return $formObject; } public function save() { $form = $this->getForm(); if (!$form->isValid($this->_data)) { return false; } return parent::save(); } }