3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'approve' => ApprovalFlowApproveActionModel::class,
35 'reject' => ApprovalFlowRejectActionModel::class,
36 'setCustomField' => ApprovalFlowSetCustomFieldActionModel::class,
37 'setCustomType' => ApprovalFlowSetCustomTypeActionModel::class,
55 if (is_null($this->action)) {
57 $data = $this->
raw(self::FIELD_ACTION);
61 $this->action = (string) $data;
78 if (is_object($value) && isset($value->$fieldName)) {
80 $discriminatorValue = $value->$fieldName;
81 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
82 return self::$discriminatorClasses[$discriminatorValue];
85 if (is_array($value) && isset($value[$fieldName])) {
87 $discriminatorValue = $value[$fieldName];
88 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
89 return self::$discriminatorClasses[$discriminatorValue];
94 $type = ApprovalFlowUpdateActionModel::class;