public static function getConstant($key)
 {
     if (!empty($key)) {
         $value = GameConstantUtil::getCacheConstant($key);
         if (!empty($value)) {
             return $value;
         }
         $settings = GameConstants::findByExample(DBUtils::getConnection(), GameConstants::create()->setKey_($key));
         if (!empty($settings) && count($settings) > 0) {
             $setting = $settings[0];
             unset($settings);
             if (!empty($setting)) {
                 $value = $setting->getValue_();
                 if (!empty($value)) {
                     return $value;
                 }
             }
         }
     }
     return null;
 }