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