Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-05 Thread Tony Marston
""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, May 3, 2006 9:17 am, Jochem Maas wrote: >> BUT there is a fourth form of polymorphism - one I would argue if the >> most common form when speaking about polymorphism with respect to >> programming, >> namely t

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-04 Thread Richard Lynch
On Wed, May 3, 2006 9:17 am, Jochem Maas wrote: > BUT there is a fourth form of polymorphism - one I would argue if the > most common form when speaking about polymorphism with respect to > programming, > namely the ability to derive a subclass from more than one base class > (simutaneously), > thi

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Robert Cummings
On Wed, 2006-05-03 at 10:59, Jochem Maas wrote: > Dave Goodchild wrote: > > That is not polymorphism - that is multiple inheritance. Java can't do > > well that clears up my misuse of the terminology! > > > that either, and uses a much cleaner method - interfaces. And interfaces > > are support

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Dave Goodchild
Not multiple inheritance. Inheritance. Not multiple orgasm. Intercourse. On 03/05/06, Jochem Maas <[EMAIL PROTECTED]> wrote: Dave Goodchild wrote: > That is not polymorphism - that is multiple inheritance. Java can't do well that clears up my misuse of the terminology! > that either, and uses

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Jochem Maas
Dave Goodchild wrote: That is not polymorphism - that is multiple inheritance. Java can't do well that clears up my misuse of the terminology! that either, and uses a much cleaner method - interfaces. And interfaces are supported in php5. So php does allow it. Not polymorphism - multiple n

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Dave Goodchild
That is not polymorphism - that is multiple inheritance. Java can't do that either, and uses a much cleaner method - interfaces. And interfaces are supported in php5. So php does allow it. Not polymorphism - multiple inheritance. Not multiple inheritance - interfaces. On 03/05/06, Jochem Maas <[E

[PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-03 Thread Jochem Maas
Original Message On Fri, 2006-03-24 at 10:50, Jochem Maas wrote: Pham Huu Le Quoc Phuc wrote: > I want to execute polymorphism. > I said (a long time ago): ...BUT the OP didn't ask about polymorphism and php doesn't support it at all anyway. Rob replied (also quite a lon

Re: [PHP] Parents constructor

2006-03-24 Thread Robert Cummings
On Fri, 2006-03-24 at 10:50, Jochem Maas wrote: > Pham Huu Le Quoc Phuc wrote: > > I want to execute polymorphism. > > > > ...BUT the OP didn't ask about polymorphism and php > doesn't support it at all anyway. Ummm, PHP supports polymorphism.. it has at least since PHP 4. http://whatis.tec

Re: [PHP] Parents constructor

2006-03-24 Thread tedd
Pham said: I want to execute polymorphism. I've felt that way too. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parents constructor

2006-03-24 Thread Jochem Maas
or pattern - Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Pham Huu Le Quoc Phuc" <[EMAIL PROTECTED]> Cc: "Peter Lauri" <[EMAIL PROTECTED]>; "PHP-General" Sent: Friday, March 24, 2006 2:01 PM Subject: Re: [PHP] P

Re: [PHP] Parents constructor

2006-03-23 Thread Pham Huu Le Quoc Phuc
I want to execute polymorphism. - Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Pham Huu Le Quoc Phuc" <[EMAIL PROTECTED]> Cc: "Peter Lauri" <[EMAIL PROTECTED]>; "PHP-General" Sent: Friday, March 24, 2006

Re: [PHP] Parents constructor

2006-03-23 Thread Robert Cummings
On Fri, 2006-03-24 at 01:48, Pham Huu Le Quoc Phuc wrote: > In PHP, I can do the flowing code: What you mean to say is that in PHP5 and only in PHP5 can you use interfaces... and that would only be true if the following code were correct. > interface A > { > function Get(); > } > > class B ex

Re: [PHP] Parents constructor

2006-03-23 Thread Pham Huu Le Quoc Phuc
riginal Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Peter Lauri" <[EMAIL PROTECTED]> Cc: "PHP-General" Sent: Friday, March 24, 2006 12:57 PM Subject: Re: [PHP] Parents constructor > On Fri, 2006-03-24 at 00:40, Peter Lauri wrote

Re: [PHP] Parents constructor

2006-03-23 Thread Robert Cummings
On Fri, 2006-03-24 at 00:40, Peter Lauri wrote: > Hi, > > I have a class B that extends class A. I want to call constructor of A > correctly, how to do that. This is how I tried: > > Class B extends A { > Function B($Bvariable) { > Parent::A($Bvariable); > } > > } > >

[PHP] Parents constructor

2006-03-23 Thread Peter Lauri
Hi, I have a class B that extends class A. I want to call constructor of A correctly, how to do that. This is how I tried: Class B extends A { Function B($Bvariable) { Parent::A($Bvariable); } } Class A { Function A($Avariable) { Dostuff..