Thanks to Lonny Kapelushnik I’ve discovered that C#-style getters and setters might be coming to PHP in some future. There is already an implementation. He mentioned it as a response to my previous article.
So, this might be possible in near PHP future:
1 2 3 4 5 6 7 8 9 10 11 | |
Read about the cool solution here.