|
Posted by Toby A Inkster on 07/23/07 08:36
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/
Navigation:
[Reply to this message]
|