3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'setAuthorName' => ReviewSetAuthorNameActionModel::class,
35 'setCustomField' => ReviewSetCustomFieldActionModel::class,
36 'setCustomType' => ReviewSetCustomTypeActionModel::class,
37 'setCustomer' => ReviewSetCustomerActionModel::class,
38 'setKey' => ReviewSetKeyActionModel::class,
39 'setLocale' => ReviewSetLocaleActionModel::class,
40 'setRating' => ReviewSetRatingActionModel::class,
41 'setTarget' => ReviewSetTargetActionModel::class,
42 'setText' => ReviewSetTextActionModel::class,
43 'setTitle' => ReviewSetTitleActionModel::class,
44 'transitionState' => ReviewTransitionStateActionModel::class,
62 if (is_null($this->action)) {
64 $data = $this->
raw(self::FIELD_ACTION);
68 $this->action = (string) $data;
85 if (is_object($value) && isset($value->$fieldName)) {
87 $discriminatorValue = $value->$fieldName;
88 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
89 return self::$discriminatorClasses[$discriminatorValue];
92 if (is_array($value) && isset($value[$fieldName])) {
94 $discriminatorValue = $value[$fieldName];
95 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
96 return self::$discriminatorClasses[$discriminatorValue];
101 $type = ReviewUpdateActionModel::class;