Answer the question
In order to leave comments, you need to log in
Does it make sense to create a root class with a description of magic properties in PHP?
I will have many classes, inheritance, etc.
How much does it make sense to create a Core or Base class, in which such properties as
__set
__get
__wakeup, etc., etc. would be described,
this class will already inherit all the rest
, the point is to make the description of all these methods once in the project
Answer the question
In order to leave comments, you need to log in
If the project uses magic methods, then, IMHO, something is wrong with the architecture
Well, about inheritance: you most likely do not need it https://en.wikipedia.org/wiki/Composition_over_inh...
The problem of the approach is that when you really have to inherit from some class, you will not be able to, because there will already be inheritance from the base class, and multiple inheritance in php has not been delivered
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question