Re: Using a Resource as a Class Property
- From: Toby A Inkster <usenet200707@xxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Jul 2007 09:36:10 +0100
Sanders Kaufman wrote:
So extended (child?) classes MUST NOT (for OOP reasons) automatically
call a constructor. Rather, it should be called manually, if and when
it's desired.
s/MUST NOT/DO NOT/
Of course, if you don't define a __construct() method in the child
class, the parent class' constructor will get called automatically.
Basically, in PHP __construct() behaves the same way other methods
do: if you define the method in a child class, the parent class'
method will be ignored, unless you explicitly call it from within
the child class' method (using "parent::method()").
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 32 days, 12:11.]
Parsing an HTML Table with PEAR's XML_HTTPSax3
http://tobyinkster.co.uk/blog/2007/07/20/html-table-parsing/
.
- Follow-Ups:
- Re: Using a Resource as a Class Property
- From: Sanders Kaufman
- 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
- 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
- Using a Resource as a Class Property
- Prev by Date: Re: Problem with PHP output
- Next by Date: php mail() question
- 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
|