estratocloud / edifact

Parser and Serializer for UN/EDIFACT messages in PHP
Apache License 2.0
35 stars 9 forks source link

CharactersInterface #3

Closed nerdoc closed 6 years ago

nerdoc commented 6 years ago

Just a question: why did you create an Interface for the Characters? is it supposed to have more than one implementation? Or just for encapsulation purposes?

duncan3dc commented 6 years ago

Hi @nerdoc

I always try to follow best practices and not depend on concrete classes, it makes the code flexible and able to support use cases I might not have thought of when I write it.

In this specific case, I originally did it so that people could produce their own concrete class using their standard default control characters. However recently I've been making use of it when looking into TRADACOMS

nerdoc commented 6 years ago

Thanks!