ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Object Overloading in PHP 5
Subject:   On dynamic getters and setters
Date:   2005-09-01 08:17:25
From:   OliverBrown
"When using real getter and setter methods, it's possible to distinguish between private properties that external code may access and really private properties that are totally invisible from the outside. With method overloading enabled, this distinction is no longer possible, because there are virtual getter and setter methods for everything"


This isn't actually a problem since there is nothing to stop you defining a real getter or setter for a property that does need special attention (since __call is only executed if the method doesn't exist).