Chris wrote:
I have an abstract class with quite a few 'children'. Essentially I want to be able to interchange calls between children (Take a script, written with ClassA and redefine the variable as ClassB etc.)
Though there is a large subset of methods all of these children declare, there are a few which only *some* declare. What I think I'm looking for is a variation on an abstract method that, if not defined in a child, will do nothing. Using an abstract method forces me to declare the method in the child with an empty body.
AFAIK, there is no support for this explicitly in PHP5. You would have to implement something yourself, like putting a die() or exit in the abstract method in the parent class.
If you just want an empty funciton anyway, why don't you just put an empty function in the parent? I don't see why you would need PHP to yell at you when you don't want to do antyhing with it anyway.
-- paperCrane <Justin Patrin>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php