Re: [PHP] PHP5 Inheritance/method override problem

2006-12-09 Thread Richard Lynch
You can't override the method signature in subclasses in PHP5. If you want this in PHP6, research the ...discusssion... from last month on this topic on the PHP-Internals mailing list, and weigh in if it's not already a Dead Horse. I recall the ...discussion... more for entertainment value than a

RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Edward Kay
> > Hi Richard, > > > > This is very strange. I can certainly reproduce the problem. Putting a > > var_dump($this) in ClassA's save method shows that PHP sees $this as an > > instance of ClassB - when it should be of ClassA. > > what *you* think it should be and what php's developers decided > it s

RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Brad Fuller
> -Original Message- > From: Richard Morris [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 06, 2006 10:22 AM > To: php-general@lists.php.net > Subject: [PHP] PHP5 Inheritance/method override problem > > Hi, > > I came across this problem and I was wo

Re: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Jochem Maas
Edward Kay wrote: > Hi Richard, > > This is very strange. I can certainly reproduce the problem. Putting a > var_dump($this) in ClassA's save method shows that PHP sees $this as an > instance of ClassB - when it should be of ClassA. what *you* think it should be and what php's developers decided

RE: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Edward Kay
Hi Richard, This is very strange. I can certainly reproduce the problem. Putting a var_dump($this) in ClassA's save method shows that PHP sees $this as an instance of ClassB - when it should be of ClassA. I'm afraid it's stumped me too! Does anyone else have any thoughts? Edward > Hi, > > I ca

Re: [PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-06 07:22:22 -0800: > Basically I have one class that performs a certain task. I then have a > second class which extends the first class and performs some tasks in > addition to the first class. Even though ClassA should know nothing > about ClassB since ClassA is

[PHP] PHP5 Inheritance/method override problem

2006-12-06 Thread Richard Morris
Hi, I came across this problem and I was wondering if someone might be able to explain to my why it is happening. I put together a short example to illustrate the problem that I am having. Basically I have one class that performs a certain task. I then have a second class which extends th