Allows custom Currency Provider through inheritance#94
Allows custom Currency Provider through inheritance#94tigitz wants to merge 1 commit intobrick:masterfrom
Conversation
Introduce the ability to provide a list of supported currencies that can be different than the hardcoded ISO 4217 ones (e.g. Crypto)
|
Interesting approach @tigitz!
Why extend
Can you share the rough idea without writing the code? |
|
Thanks 🙂
You're right, this is part of the "composition" approach I'm suggesting, which would have a more significant impact. I'm in the process of writing a more detailed comment in #30 to explain everything thoroughly. Catch you there 😉 |
|
Superseded by #95 |
This is a minimal proof of concept for #30 and #61
It uses inheritance as a point of extension for custom logic.
Pros are that existing userland logic will still work as expected while allowing flexibility for more complex use cases.
However extending through composition would be much more robust but would require a profound rewrite of current classes.