Re: Re: OOP::problem?

From: Date: Sun, 06 Apr 2003 11:21:41 +0000
Subject: Re: Re: OOP::problem?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4663@lists.php.net to get a copy of this message
On Sat, 5 Apr 2003, Alan Knowles wrote: > PHP is more like C# than Java - in theory you should use the overload > extension if you want to implement setter/getters to implement future > refactoring/ BC API stuff. (actually the plan is for DB_DataObjects to > do this one day) Overload extension is not quite usable at the moment: http://bugs.php.net/bug.php?id=22004 > However it's not a totally clean line (sometimes setters/getters do > still make sense.) I think it better to stick in on way only. Whether to always access properties directly or to always provide an accessor method. Personally I prefer the acccessor methods, slower or not. If you sometimes access properties directly and sometimes by accesssor methods the code will get quite confusing for other developers. -- Mika Tuupola http://www.appelsiini.net/~tuupola/

« previous php.pear.general (#4663) next »