I have a static class with a very long name, example:
class SomeClassWithAVeryLongName {
const CONST_ONE = 'foo';
const CONST_TWO = 'bar';
}
In my other class, I want to reference these constants. The problem is there are a bunch of them and I use them as associative keys so my code gets very verbose:
$someArray[SomeClassWithAVeryLongName::CONST_ONE][SomeClassWithAVeryLongName::CONST_TWO] = 'foobar';
Is there a way I can use a pointer of some kind? Something like:
// Pseudo code
$scwavln = 'SomeClassWithAVeryLongName';
$someArray[$scwavln::CONST_ONE][$scwavln::CONST_TWO] = 'foobar';
It doesn't seem to be working for me. I'm on PHP 5.2.6.