DifferentialChangesetView

This commit is contained in:
epriestley
2011-01-24 15:52:35 -08:00
parent e85ecd03de
commit a3df19976f
13 changed files with 1613 additions and 4 deletions

View File

@@ -40,12 +40,29 @@ class DifferentialDiff extends DifferentialDAO {
protected $creationMethod;
private $unsavedChangesets = array();
private $changesets;
public function addUnsavedChangeset(DifferentialChangeset $changeset) {
if ($this->changesets === null) {
$this->changesets = array();
}
$this->unsavedChangesets[] = $changeset;
$this->changesets[] = $changeset;
return $this;
}
public function attachChangesets(array $changesets) {
$this->changesets = $changesets;
return $this;
}
public function getChangesets() {
if ($this->changesets === null) {
throw new Exception("Must load and attach changesets first!");
}
return $this->changesets;
}
public function loadChangesets() {
if (!$this->getID()) {
return array();