Hello, Amir!
- That was just a quick testing in the existing class. For the actual project of course I would write this method in a separate utility class. you are completely right on that. Still, I edited my code to avoid bad examples.
- I need a method to return storage position of property in $lb at runtime, and I also can't modify existing classes to achieve that (for example by generating a method for each class with precomputed property name=storage position values).
- Impossible, because 2.
That said I do agree that idea with method generators is good, just not applicable in this exact case.
- Log in to post comments