I have child class in different namespace than it's parent abstract class in child class construct method looks like this:
namespace someNameSpace;
class childClass extends \parentClass
function __construct()
{
parent::__construct();
}
in parent class constructor I should call another class method in child namespace. Something like this:
abstract class parentClass
function __construct()
{
somenameSpace\anotherChildClass::method();
}
the problem: I can't just write somenameSpace\anotherChildClass because I have many child classes each in different namespace, and namespace should be dynamic.
If I write just anotherChildClass::method(); I got class not found error because it executed in parent namespace. How could I solve this?