Give an example of a good solution for using traits in PHP. (or describe the situation when the decision to use the traits will be justified or even the only correct one)
This is a great replacement for multiple inheritance. A working example is the implementation of “fat” models — when form validation methods are put into a trait and simply connected to models.
wolandwoland
1,68311 golden mark2323 silver marks5858 bronze marks
If you also offer some code, I will thank you and close this question. - Alexey Danchin