Hey guys,
Couldn’t think of a better title! The problem is pretty simple.
Say, I have a const ‘table_name’ in derived class Girl. And, I want to get its value in base class Person.
I’m currently returning the name of the derived class from a method call to my registry in the base class constructor.
So, the below code works fine:
$class_name = $this->registry->loader->get_class_controller_main_name();
echo $class_name::table_name;
However, I was wondering if there’s any way to not have to first store the name of the derived class in a variable?
Much thanks,
Bardi