fruitl00p / php-mt940

A mt940 parser in PHP
MIT License
103 stars 60 forks source link

made engines open for extension from outside #23

Closed delassiter closed 8 years ago

delassiter commented 8 years ago

I need to extend the library with an engine, but I am not allowed to do so open source (bank rules). I therefore need a way to inject an engine.

I would have rather added a EngineInterface, and changed the inheritance. A Engine-Implementation does not need to be able to detect a bank, etc. But I opted for a small change instead.

The rules for each engine are now implemented inside of the specific engine class.

fruitl00p commented 8 years ago

Awesome! Looks pretty cool! I dare ask which bank, but you don't have to answer :)

Anyway, very cool change! If the tests work out, i see no reason not to merge!

fruitl00p commented 8 years ago

There ya go! Thanks!

delassiter commented 8 years ago

I doubt I'm allowed to say - but it goes against everything I stand for ;-) Thanks for the quick merge!

fruitl00p commented 8 years ago

Again, thanks for the pull... It's been something i had in mind a while ago but just didn't get around to ;)