Re: [Phplib-users] Question on subclassing
Brought to you by:
nhruby,
richardarcher
From: Jesse S. <ph...@sw...> - 2001-08-15 16:21:26
|
Just re-declare them. Something like... class MyClass { var $var1 = 1; var $var2 = 2; someFunction() { } } class MySubClass extends MyClass { var $var1 = 3; var $var2 = 4; someFunction() { } } > From: Peter Bowyer <re...@f2...> > Date: Wed, 15 Aug 2001 13:25:03 +0100 > To: phplib List <php...@li...> > Subject: [Phplib-users] Question on subclassing > > Hi, > > I understand how to subclass the functions in a class, or add new > functions. My question is how do I subclass the var $varname ones? I want > to subclass the following: > > /* public: configuration parameters */ > var $Auto_Free = 0; ## Set to 1 for automatic mysql_free_result() > var $Debug = 0; ## Set to 1 for debugging messages. > var $Halt_On_Error = "no"; ## "yes" (halt with message), "no" (ignore > errors quietly), "report" (ignore errror, but spit a warning) > > to allow me to specify debug and Halt_On_Error without editing the real > classes, which makes it much easier to upgrade PHPLib. > > Thanks, > Peter. > > --oOo-- > Narrow Gauge on the web - photos, directory and forums! > http://www.narrow-gauge.co.uk > --oOo-- > Peter's web page - Scottish narrow gauge in 009 > http://members.aol.com/reywob/ > --oOo-- > > > _______________________________________________ > Phplib-users mailing list > Php...@li... > http://lists.sourceforge.net/lists/listinfo/phplib-users |