I remember reading that in Doctrine 2 models, I should not set properties/fields public. How then would you expose these fields? The sandbox used get*()
& set*()
methods. Is that the best idea? Its very cumbersome. Using magic methods __get()
__set()
will make things similar to setting fields public?
Whats your recommendation?
See Question&Answers more detail:os