2014-06-10 15:50:10 -07:00

20 lines
501 B
PHP

<?php
class Cana_Table_Trackchange extends Cana_Table {
public function save() {
if ($this->{$this->idVar()}) {
$objectName = $this->_changeSetName ? $this->_changeSetName : get_class($this);
$objectName .= '_Changeset';
$this->_changeSet = new $objectName(Cana_Changeset::save($this));
}
parent::save();
}
public function changeSet() {
if (!isset($this->_changeSet)) {
$sets = $this->changeSets();
$this->_changeSet = array_pop($sets);
}
return $this->_changeSet;
}
}