You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$somevar = $array->{$key}->key2->0->asInteger(0); // It will perform intval() operation before returning, so you can be sure that there will be an integer value.
64
+
// asDouble() also will replace comma "," to a point ".", for example value 1,93 will be converted to 1.93
65
+
$floating_point_value = new LazyAccessTyped(['test_float' => ['inner' => '1,93']])->test_float->inner->asDouble(0); // Will return 1.93
66
+
```
67
+
27
68
It provides ability to use array operator ("[]") or object operator ("->") to access nesting array elements!
28
69
29
-
#Note
70
+
#Note
30
71
31
72
There are two classes LazyAccess and LazyAccessTyped. LazyAccessTyped provides ability to use converters such as asFloat(), asInteger() and etc.
32
73
33
-
Please, do not use LazyAccess, cause it can behave unpredictible with it's return value. LazyAccessTyped is more better decision.
74
+
Please, do not use LazyAccess, cause it can behave unpredictible with it's return value. LazyAccessTyped is much better and safer.
0 commit comments