/** * Commit changes to the main data set. This is performed by save() * and should not be done manually in most cases. */ function commit() { if (!is_null($this->changeset)) { $core =& $this->getCore(); if (!is_array($core) && !is_object($core)) { $pks = $this->storage_method->getPrimaryKeys(); $this->set(array($pks[0] => $core)); } foreach (array_keys($this->changeset) as $key) { parent::setref($this->changeset[$key], $key); } } $this->changeset = NULL; }