3 files changed
+61
-18
No files matched your search
@@ -37,6 +37,14 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
|
||||
case length_frame;
|
||||
case height_frame;
|
||||
case width_frame;
|
||||
case length_min;
|
||||
case length_max;
|
||||
case height_min;
|
||||
case height_max;
|
||||
case width_min;
|
||||
case width_max;
|
||||
case diameter_min;
|
||||
case diameter_max;
|
||||
|
||||
/**
|
||||
* Returns a value of this type based on a string.
|
||||
@@ -69,6 +77,14 @@ public static function fromString(string $input):MDMeasurementType {
|
||||
'length_frame' => self::length_frame,
|
||||
'height_frame' => self::height_frame,
|
||||
'width_frame' => self::width_frame,
|
||||
'length_min' => self::length_min,
|
||||
'length_max' => self::length_max,
|
||||
'height_min' => self::height_min,
|
||||
'height_max' => self::height_max,
|
||||
'width_min' => self::width_min,
|
||||
'width_max' => self::width_max,
|
||||
'diameter_min' => self::diameter_min,
|
||||
'diameter_max' => self::diameter_max,
|
||||
default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
||||
};
|
||||
|
||||
@@ -105,6 +121,14 @@ public static function fromInt(int $input):MDMeasurementType {
|
||||
19 => self::length_frame,
|
||||
20 => self::height_frame,
|
||||
21 => self::width_frame,
|
||||
22 => self::length_min,
|
||||
23 => self::length_max,
|
||||
24 => self::height_min,
|
||||
25 => self::height_max,
|
||||
26 => self::width_min,
|
||||
27 => self::width_max,
|
||||
28 => self::diameter_min,
|
||||
29 => self::diameter_max,
|
||||
default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
||||
};
|
||||
|
||||
@@ -161,6 +185,14 @@ public function getHighestSuperordinate():MDMeasurementType {
|
||||
self::length_frame => self::length,
|
||||
self::height_frame => self::height,
|
||||
self::width_frame => self::width,
|
||||
self::length_min => self::length,
|
||||
self::length_max => self::length,
|
||||
self::height_min => self::height,
|
||||
self::height_max => self::height,
|
||||
self::width_min => self::width,
|
||||
self::width_max => self::width,
|
||||
self::diameter_min => self::diameter,
|
||||
self::diameter_max => self::diameter,
|
||||
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
||||
};
|
||||
|
||||
@@ -195,6 +227,14 @@ public function toInt():int {
|
||||
self::length_frame => 19,
|
||||
self::height_frame => 20,
|
||||
self::width_frame => 21,
|
||||
self::length_min => 22,
|
||||
self::length_max => 23,
|
||||
self::height_min => 24,
|
||||
self::height_max => 25,
|
||||
self::width_min => 26,
|
||||
self::width_max => 27,
|
||||
self::diameter_min => 28,
|
||||
self::diameter_max => 29,
|
||||
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user