3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addStagedAction' => OrderEditAddStagedActionActionModel::class,
35 'setComment' => OrderEditSetCommentActionModel::class,
36 'setCustomField' => OrderEditSetCustomFieldActionModel::class,
37 'setCustomType' => OrderEditSetCustomTypeActionModel::class,
38 'setKey' => OrderEditSetKeyActionModel::class,
39 'setStagedActions' => OrderEditSetStagedActionsActionModel::class,
57 if (is_null($this->action)) {
59 $data = $this->
raw(self::FIELD_ACTION);
63 $this->action = (string) $data;
80 if (is_object($value) && isset($value->$fieldName)) {
82 $discriminatorValue = $value->$fieldName;
83 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
84 return self::$discriminatorClasses[$discriminatorValue];
87 if (is_array($value) && isset($value[$fieldName])) {
89 $discriminatorValue = $value[$fieldName];
90 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
91 return self::$discriminatorClasses[$discriminatorValue];
96 $type = OrderEditUpdateActionModel::class;