Differential D21564 Diff 51352 src/applications/herald/storage/transcript/HeraldConditionTranscript.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/storage/transcript/HeraldConditionTranscript.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public function setTestValue($test_value) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getTestValue() { | public function getTestValue() { | ||||
return $this->testValue; | return $this->testValue; | ||||
} | } | ||||
public function setResult(HeraldConditionResult $result) { | public function setResult(HeraldConditionResult $result) { | ||||
$this->resultMap = $result->toMap(); | $this->resultMap = $result->newResultMap(); | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getResult() { | public function getResult() { | ||||
$map = $this->resultMap; | $map = $this->resultMap; | ||||
if (is_array($map)) { | if (is_array($map)) { | ||||
$result = HeraldConditionResult::newFromMap($map); | $result = HeraldConditionResult::newFromResultMap($map); | ||||
} else { | } else { | ||||
$legacy_result = $this->result; | $legacy_result = $this->result; | ||||
$result_data = array(); | $result_data = array(); | ||||
if ($legacy_result === 'forbidden') { | if ($legacy_result === 'forbidden') { | ||||
$result_code = HeraldConditionResult::RESULT_OBJECT_STATE; | $result_code = HeraldConditionResult::RESULT_OBJECT_STATE; | ||||
$result_data = array( | $result_data = array( | ||||
Show All 18 Lines |