Re: Accessing child constants from base class

From: Date: Fri, 10 Oct 2003 17:22:44 +0000
Subject: Re: Accessing child constants from base class
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-4782@lists.php.net to get a copy of this message
Ard Biesheuvel wrote:
How about an abstract method in the base class called getElementName(), which each child will implement to return its element name. Hi Ard-
This wouldn't work because the abstract method in the base class is still running in the 'base class scope' and can't see the child's constants. Dan Cox

« previous php.internals (#4782) next »