Re: [PHP] class effeciency

2002-02-28 Thread S.Murali Krishna
Hi I too suggested a way for your previous problem. What you are doing is right here, but some corrections are there. You cannot use 'var' to declare variables inside constructors rather you could use them only before constructor, and intialize them inside constructor, look out the

Re: [PHP] class effeciency

2002-02-28 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then SMurali Krishna declared Hi I too suggested a way for your previous problem What you are doing is right here, but some corrections are there You cannot use 'var' to declare variables inside constructors rather you could

Re: [PHP] class effeciency

2002-02-28 Thread Simon Willison
Nick Wilson wrote: Is there a better way? It just seems like overkill to include 6-700 lines of methods /twice/ Use inheritance Define a base class with all of the methods in it Then define the two other classes to extend this base class, meaning they will have all of the methods you have

Re: [PHP] class effeciency

2002-02-28 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Simon Willison declared Nick Wilson wrote: Is there a better way? It just seems like overkill to include 6-700 lines of methods /twice/ Use inheritance Define a base class with all of the methods in it Then define the two other

Re: [PHP] class effeciency

2002-02-28 Thread Mika Tuupola
On Thu, 28 Feb 2002, Nick Wilson wrote: It is only the *properties* that are different in each language class not the methods so I'm including all the same methods twice! That doesn't seem terribly efficient There is no need to rewrite the methods See: