Conditions | 3 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public static function getConstants() { |
||
15 | if (self::$constCacheArray==NULL) { |
||
16 | self::$constCacheArray=[ ]; |
||
17 | } |
||
18 | $calledClass=get_called_class(); |
||
19 | if (!array_key_exists($calledClass, self::$constCacheArray)) { |
||
20 | $reflect=new \ReflectionClass($calledClass); |
||
21 | self::$constCacheArray [$calledClass]=$reflect->getConstants(); |
||
22 | } |
||
23 | return self::$constCacheArray [$calledClass]; |
||
24 | } |
||
25 | |||
45 | } |