Re: [PHP] Class inheritance behaviour

2003-09-21 Thread Robert Cummings
On Sun, 2003-09-21 at 14:10, Gerard Samuel wrote: > Robert Cummings wrote: > > >Are you looking to create a single point of access to any libraries your > >application may wish to use > > > Yes. Instead of juggling 5-6 objects, just move around one object. > > > and to subsequently base this on

Re: [PHP] Class inheritance behaviour

2003-09-21 Thread Gerard Samuel
Robert Cummings wrote: Are you looking to create a single point of access to any libraries your application may wish to use Yes. Instead of juggling 5-6 objects, just move around one object. and to subsequently base this on a singleton pattern (only one instance of the object may exist?)? Yes.

Re: [PHP] Class inheritance behaviour

2003-09-21 Thread Robert Cummings
Are you looking to create a single point of access to any libraries your application may wish to use and to subsequently base this on a singleton pattern (only one instance of the object may exist?)? Rob. On Sun, 2003-09-21 at 13:18, Gerard Samuel wrote: > Robert Cummings wrote: > > >Method ove

Re: [PHP] Class inheritance behaviour

2003-09-21 Thread Gerard Samuel
Robert Cummings wrote: Method overriding is one of the core principles of any Object Oriented (OO) language. By having second_class extend first_class you get all the functionality of first_class, but generally you extend a class because you want to inherit all of the functionality with a few diff

Re: [PHP] Class inheritance behaviour

2003-09-21 Thread Robert Cummings
Method overriding is one of the core principles of any Object Oriented (OO) language. By having second_class extend first_class you get all the functionality of first_class, but generally you extend a class because you want to inherit all of the functionality with a few differences. For this reason

[PHP] Class inheritance behaviour

2003-09-21 Thread Gerard Samuel
Just double checking with the php crowd. Code example: - $bar = new second_class; echo $bar->foo() . ''; var_dump(get_class_methods('second_class')); class first_class { function foo() { echo 'foo from class first_class'; } } class second_class extends first_class {