RE: [PHP-DEV] Constructor Inheritance

From: Date: Mon, 21 May 2001 15:43:39 +0000
Subject: RE: [PHP-DEV] Constructor Inheritance
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-56063@lists.php.net to get a copy of this message
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:Tiago.Moitinho@oni.pt] Sent: 21 May 2001 16:18 To: 'php-dev@lists.php.net' 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: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#56063) next »