/** * * Fetches a new record and appends it to the collection. * * @param array $spec An array of data for the new record. * * @return Solar_Sql_Model_Record The newly-appended record. * */ public function appendNew($spec = null) { // create a new record from the spec and append it $record = $this->_model->fetchNew($spec); $this->_data[] = $record; return $record; }
/** * * Sets the default values for elements, using the model. * * @return void * */ protected function _setDefault() { $this->_default = $this->_model->fetchNew(); }