On 10/15/07, Jay Blanchard <jblanchard@xxxxxxxxxx> wrote: > > [snip] > >With a class you can inherit all of the base class functionality > >into a new customer type. You do not have to break open the base > >class to add a case, you just have to create an extension class. > >Documentation is unique to each class. > > No matter what, you have to break something open to add code -- if > nothing else, the script. > [/snip] > > The base class would (should?) be contained in its own script space. For > instance you might have the customer class in a file called > class.customer.php. You do not have to open this script to add another > class or extend this class, you would just add another file like > class.customerCommercial.php that extends the customer class. Since > autoload is available now (http://www.php.net/autoload) you would not even > have to open the 'calling' script to add an include line. > furthermore using a delegation technique like Stut demonstrated, you may not even need to edit a file to instantiate the class and call a method. -nathan