Bastian Grupe wrote:
Uhh... how about using private and only using a "regular"
getter (the Java-style) and no setter?
class xx
{
private $bar;
public getBar() { return $bar; }
}
i think you're missing the point, the idea is to *not*
have to write that extra getter line ... less typing
*and* less error prone ... and easier to read, too IMHO
You didn't want to return $bar in your example, you wanted
to return $this->bar so you already ran into one of the
issues here ;)
--
Hartmut Holzgraefe, Senior Support Engineer .
MySQL AB, www.mysql.com
Are you certified? http://www.mysql.com/training/certification
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php