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
<pclass="message-info">new in version <code>9.29</code></p>
719
719
720
-
You can directly register a callback if you are using `PHP8.5+` prior to this version the code will throw an error since using
721
-
a static closure on attribute is not yet valid.
720
+
You can directly register a callback if you are using `PHP8.5+` prior to this version the code will throw an error since using a static closure on attribute is not yet valid.
722
721
723
722
Once your code is migrated to the correct PHP version you can write the following:
724
723
@@ -735,17 +734,13 @@ use League\Csv\Serializer;
735
734
private ?int $amount;
736
735
```
737
736
738
-
This will result in the same mapping as the previous example using the alias. But you no longer have to register the `alias` yourself as
739
-
this is taking care of by the engine itself.
740
-
741
-
<pclass="message-notice">Of note, if you want to re-use multiple time registering the callback casting using an
742
-
explicit <code>alias</code> will always be the recommended way.</p>
737
+
This will result in the same mapping as the previous example using the alias. But you no longer have to register the `alias` yourself as this is taking care of by the engine itself.
743
738
739
+
<pclass="message-notice">Of note, if you want to re-use multiple time registering the callback casting using an explicit <code>alias</code> will always be the recommended way.</p>
744
740
745
741
### Implementing a TypeCasting class
746
742
747
-
If you need to support `Intersection` type you need to provide your own class to typecast the value according
748
-
to your own rules. Since the class is not registered by default:
743
+
If you need to support `Intersection` type you need to provide your own class to typecast the value according to your own rules. Since the class is not registered by default:
749
744
750
745
- you must configure its usage via the `MapCell` attribute `cast` argument
0 commit comments