3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addLocation' => ZoneAddLocationActionModel::class,
35 'changeName' => ZoneChangeNameActionModel::class,
36 'removeLocation' => ZoneRemoveLocationActionModel::class,
37 'setDescription' => ZoneSetDescriptionActionModel::class,
38 'setKey' => ZoneSetKeyActionModel::class,
56 if (is_null($this->action)) {
58 $data = $this->
raw(self::FIELD_ACTION);
62 $this->action = (string) $data;
79 if (is_object($value) && isset($value->$fieldName)) {
81 $discriminatorValue = $value->$fieldName;
82 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
83 return self::$discriminatorClasses[$discriminatorValue];
86 if (is_array($value) && isset($value[$fieldName])) {
88 $discriminatorValue = $value[$fieldName];
89 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
90 return self::$discriminatorClasses[$discriminatorValue];
95 $type = ZoneUpdateActionModel::class;