Object Overloading

The most fascinating thing that I read in this article was about being able to dynamically create getter and setter methods. Over the years some of my class files have really gotten bogged down with having getter setter methods for every property. Now, using a single function, you can accomplish this. The author points out a couple of drawbacks however, the biggest one being that documentation doesn’t pick up on what’s happening when you use the __call() function.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>