My question is pretty clear and I really would like to hear some reasons for the answer.
Additional Information:
- I do not use any PHP frameworks.
- PHP> 5.3.
Update:
Now I do not have a lot of restrictions on my project, this is a project of one person, and I worked hard to make everything as tight and modular as possible. as I was told, I did not like the PDO API after playing with it for a while, but this is not a big problem if you stick to it. The Public API will give me more flexibility or is considered good practice.
So my question is: what would you win and lose using composition or inheritance, considering the object in question, is it the level of abstraction, PDO in this case?
tl; dr: a project of one person who is trying to be as modular as possible, composition or Inheritance to use a third-party abstraction layer (PDO in particular)?
Note: if this is not the place, vote to go to Programmers. and sorry for my bad english.
user529649
source share