Re: OOP::problem?

From: Date: Sat, 05 Apr 2003 21:27:57 +0000
Subject: Re: OOP::problem?
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4659@lists.php.net to get a copy of this message
>This is not quite true - method type accessors are slow in PHP (as they >involve a function call). > >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) That's true. Thanks for the correction. My webhost is a little slow in upgrading, so I tend to develop with extreme BC in mind. > >However it's not a totally clean line (sometimes setters/getters do >still make sense.) > >- however just putting in setters/getters for all variables when they >dont need it is a little silly. This definitely would be silly! I was only suggesting that the public properties be made accesible this way. Private properties should be as inaccessible as possible. BTW, my curiosity got the best of me and I read up a little on PHP5. WOW!!! Bravo!!! Looks very promising. I only hope my webhost will listen to my pleas. Dan

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