3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'setApprovers' => ApprovalRuleSetApproversActionModel::class,
35 'setCustomField' => ApprovalRuleSetCustomFieldActionModel::class,
36 'setCustomType' => ApprovalRuleSetCustomTypeActionModel::class,
37 'setDescription' => ApprovalRuleSetDescriptionActionModel::class,
38 'setKey' => ApprovalRuleSetKeyActionModel::class,
39 'setName' => ApprovalRuleSetNameActionModel::class,
40 'setPredicate' => ApprovalRuleSetPredicateActionModel::class,
41 'setRequesters' => ApprovalRuleSetRequestersActionModel::class,
42 'setStatus' => ApprovalRuleSetStatusActionModel::class,
60 if (is_null($this->action)) {
62 $data = $this->
raw(self::FIELD_ACTION);
66 $this->action = (string) $data;
83 if (is_object($value) && isset($value->$fieldName)) {
85 $discriminatorValue = $value->$fieldName;
86 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
87 return self::$discriminatorClasses[$discriminatorValue];
90 if (is_array($value) && isset($value[$fieldName])) {
92 $discriminatorValue = $value[$fieldName];
93 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
94 return self::$discriminatorClasses[$discriminatorValue];
99 $type = ApprovalRuleUpdateActionModel::class;