When you have inherited classes, where the child class sets some constants and the parent class has a static method that needs to use them:
class some_helperclass {
public static function add_them() {
return self::some_c + self::another_c;
}
}
class mainclass extends some_helperclass {
const some_c = 1;
const another_c = 2;
}
I get an error when I try to execute this:
mainclass::add_them()
Is there a way to get this to work?