예제 #1
0
 private static function getConstants()
 {
     if (self::$calledClass != get_called_class() || self::$constCache === NULL) {
         $reflect = new ReflectionClass(get_called_class());
         self::$constCache = $reflect->getConstants();
     }
     return self::$constCache;
 }
예제 #2
0
 /**
  * Get defined values
  * 
  * @return array
  */
 private static function getConstants()
 {
     // Use Reflexion to get constants defined in child class
     if (self::$calledClass != get_called_class() || self::$constCache === null) {
         $reflect = new ReflectionClass(get_called_class());
         self::$constCache = $reflect->getConstants();
     }
     return self::$constCache;
 }