Haven't tried it but try:
class B extends A {
function B(){
A::A();
// do your extra stuff here.
}
}
-----Original Message-----
From: Tiago Moitinho [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2001 16:18
To: '[EMAIL PROTECTED]'
Subject: [PHP-DEV] Constructor Inheritance
Hello all,
I am new to PHP, so please appologize if my question looks silly...
How do I inherit a class that inherits the constructor behaviour from the
parent class, assuming the parent class cannot be changed?
For instance,
class A {
// this class is already define, not changeable
function A()
// does something
}
}
class B extends A {
function B()
// inherits A construction: how do I do this?
// does something else
}
}
Thanks in advance,
Tiago
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]