示例#1
0
 /**
  * Get somewhere to store captcha data that will persist between requests
  *
  * @throws MWException
  * @return CaptchaStore
  */
 public static final function get()
 {
     if (!self::$instance instanceof self) {
         global $wgCaptchaStorageClass;
         if (in_array('CaptchaStore', class_parents($wgCaptchaStorageClass))) {
             self::$instance = new $wgCaptchaStorageClass();
         } else {
             throw new MWException("Invalid CaptchaStore class {$wgCaptchaStorageClass}");
         }
     }
     return self::$instance;
 }