Re: Using a Resource as a Class Property
- From: Sanders Kaufman <bucky@xxxxxxxxxxx>
- Date: Sun, 22 Jul 2007 20:48:26 -0500
Michael Fesser wrote:
.oO(Sanders Kaufman)
So, bottom line, what you're saying here is that when you extend a base class like this, you still have to manually call the base class's constructor? Zat right?
Correct. PHP doesn't do that automatically, except if the child class
doesn't have a constructor. Then PHP will call the one from the base
class, if it exists. But as soon as your child class uses its own
constructor, you have to manually call the parent one. Usually this
should be the first action.
Got it - and I wish I'd got it a year ago!
Is that a normal OOP way to do it - done that way in C++ and whatnot - or is this unique to PHP?
.
- Follow-Ups:
- Re: Using a Resource as a Class Property
- From: Michael Fesser
- Re: Using a Resource as a Class Property
- References:
- Using a Resource as a Class Property
- From: Sanders Kaufman
- Re: Using a Resource as a Class Property
- From: Michael Fesser
- Re: Using a Resource as a Class Property
- From: Sanders Kaufman
- Re: Using a Resource as a Class Property
- From: Michael Fesser
- Re: Using a Resource as a Class Property
- From: Sanders Kaufman
- Re: Using a Resource as a Class Property
- From: Michael Fesser
- Re: Using a Resource as a Class Property
- From: Sanders Kaufman
- Re: Using a Resource as a Class Property
- From: Michael Fesser
- Using a Resource as a Class Property
- Prev by Date: Problem with PHP output
- Next by Date: Re: Problem with PHP output
- Previous by thread: Re: Using a Resource as a Class Property
- Next by thread: Re: Using a Resource as a Class Property
- Index(es):
Relevant Pages
|