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
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.
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
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
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
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
{
6 matches
Mail list logo