I'm having a problem extending a class which itself further extends a abstract class.
The base abstract class has the following methods:
Abstract:
private final __construct()
abstract protected function loadFromId()
private static final load($id)
Class 1 extends Abstract:
protected loadFromId()
Class 2 extends Class 1:
//nothing as of yet
The reason I'm extending Class 1 from Class 2 is because I need it to return an instance of Class 1. Class 2 will basically return a null object for validation purposes.
If I attempt to extend Class 1:
Class 2 extends Class 1 { }
I receive the following error "Cannot override final method class::__construct()
", obviously because it is a private method.
Is there a way I can create a null object based on Class 1?