There are lots of examples of child classes calling overridden parent methods, most commonly parent::__construct(). In these cases, however, you are actually calling the parent from a concrete method in the child itself.
Is there a way that I can recursively call a method from the child to the first ancestor, using an inherited method?
If I use parent::methodName() in my abstract parent class it causes a fatal error saying ‘Cannot access parent:: when current class scope has no parent’. Presumably this is because ‘parent’ is being evaluated relative to the abstract class itself, not the current class context.
Thanks…
Maybe something like this? (untested)
I hate when I see this kinda junk in code.