@@ -18,21 +18,27 @@ final class DeepLinkingProps
18
18
public const EXPIRES_AT = 'expiresAt ' ;
19
19
public const DISPLAY_HEIGHT = 'displayHeight ' ;
20
20
public const DISPLAY_WIDTH = 'displayWidth ' ;
21
+ public const EXTRA_CREDIT_MAXIMUM = 'extraCreditMaximum ' ;
21
22
public const HEIGHT = 'height ' ;
22
23
public const ICON = 'icon ' ;
24
+ public const LINE_ITEM = 'lineItem ' ;
23
25
public const MEDIA_TYPE = 'mediaType ' ;
26
+ public const NORMAL_MAXIMUM = 'normalMaximum ' ;
24
27
public const PLACEMENT_ADVICE = 'placementAdvice ' ;
25
28
public const PRESENTATION_DOCUMENT_TARGET = 'presentationDocumentTarget ' ;
29
+ public const SCORE_CONSTRAINTS = 'scoreConstraints ' ;
26
30
public const TEXT = 'text ' ;
27
31
public const THUMBNAIL = 'thumbnail ' ;
28
32
public const TITLE = 'title ' ;
33
+ public const TOTAL_MAXIMUM = 'totalMaximum ' ;
29
34
public const URL = 'url ' ;
30
35
public const WIDTH = 'width ' ;
31
36
public const WINDOW_TARGET = 'windowTarget ' ;
32
37
33
38
public const TYPE_ANY_URI = 'http://www.w3.org/2001/XMLSchema#anyURI ' ;
34
39
public const TYPE_BOOLEAN = 'http://www.w3.org/2001/XMLSchema#boolean ' ;
35
40
public const TYPE_DATETIME = 'http://www.w3.org/2001/XMLSchema#date ' ;
41
+ public const TYPE_FLOAT = 'http://www.w3.org/2001/XMLSchema#float ' ;
36
42
public const TYPE_INTEGER = 'http://www.w3.org/2001/XMLSchema#integer ' ;
37
43
public const TYPE_NORMALIZED_STRING = 'http://www.w3.org/2001/XMLSchema#normalizedString ' ;
38
44
@@ -56,6 +62,11 @@ public static function getExpiresAt(array $data): DateTimeImmutable|null
56
62
return self ::getOfType ($ data , self ::EXPIRES_AT , self ::TYPE_DATETIME );
57
63
}
58
64
65
+ public static function getExtraCreditMaximum (array $ data ): float |null
66
+ {
67
+ return self ::getOfType ($ data , self ::EXTRA_CREDIT_MAXIMUM , self ::TYPE_FLOAT );
68
+ }
69
+
59
70
public static function getHeight (array $ data ): int |null
60
71
{
61
72
return self ::getOfType ($ data , self ::HEIGHT , self ::TYPE_INTEGER );
@@ -66,6 +77,11 @@ public static function getMediaType(array $data): string|null
66
77
return self ::getOfType ($ data , self ::MEDIA_TYPE , self ::TYPE_NORMALIZED_STRING );
67
78
}
68
79
80
+ public static function getNormalMaximum (array $ data ): float |null
81
+ {
82
+ return self ::getOfType ($ data , self ::NORMAL_MAXIMUM , self ::TYPE_FLOAT );
83
+ }
84
+
69
85
public static function getPresentationDocumentTarget (array $ data ): PresentationDocumentTarget |null
70
86
{
71
87
if (!isset ($ data [self ::PRESENTATION_DOCUMENT_TARGET ])) {
@@ -134,6 +150,7 @@ private static function coerce(mixed $value, string $type): mixed
134
150
return match ($ type ) {
135
151
self ::TYPE_BOOLEAN => (bool ) $ value ,
136
152
self ::TYPE_DATETIME => new DateTimeImmutable ($ value ),
153
+ self ::TYPE_FLOAT => (float ) $ value ,
137
154
self ::TYPE_INTEGER => (int ) $ value ,
138
155
self ::TYPE_NORMALIZED_STRING => preg_replace ('/[\r\n\t]+/ ' , '' , $ value ),
139
156
default => $ value ,
0 commit comments