3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addRoles' => StateAddRolesActionModel::class,
35 'changeInitial' => StateChangeInitialActionModel::class,
36 'changeKey' => StateChangeKeyActionModel::class,
37 'changeType' => StateChangeTypeActionModel::class,
38 'removeRoles' => StateRemoveRolesActionModel::class,
39 'setDescription' => StateSetDescriptionActionModel::class,
40 'setName' => StateSetNameActionModel::class,
41 'setRoles' => StateSetRolesActionModel::class,
42 'setTransitions' => StateSetTransitionsActionModel::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 = StateUpdateActionModel::class;