|
@@ 151-157 (lines=7) @@
|
| 148 |
|
* @param string $stage |
| 149 |
|
* @return Versioned|DataObject |
| 150 |
|
*/ |
| 151 |
|
protected function getObjectInStage($stage) { |
| 152 |
|
if(!class_exists($this->ObjectClass)) { |
| 153 |
|
throw new UnexpectedDataException("Invalid Class '{$this->ObjectClass}' in ChangeSetItem #{$this->ID}"); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
return Versioned::get_by_stage($this->ObjectClass, $stage)->byID($this->ObjectID); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
/** |
| 160 |
|
* Find latest version of this object |
|
@@ 164-170 (lines=7) @@
|
| 161 |
|
* |
| 162 |
|
* @return Versioned|DataObject |
| 163 |
|
*/ |
| 164 |
|
protected function getObjectLatestVersion() { |
| 165 |
|
if(!class_exists($this->ObjectClass)) { |
| 166 |
|
throw new UnexpectedDataException("Invalid Class '{$this->ObjectClass}' in ChangeSetItem #{$this->ID}"); |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
return Versioned::get_latest_version($this->ObjectClass, $this->ObjectID); |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
/** |
| 173 |
|
* Get all implicit objects for this change |