MediaWiki  1.32.5
CaptchaStore Class Reference
Inheritance diagram for CaptchaStore:
Collaboration diagram for CaptchaStore:

Public Member Functions

 clear ( $index)
 Delete a result once the captcha has been used, so it cannot be reused. More...
 
 cookiesNeeded ()
 Whether this type of CaptchaStore needs cookies. More...
 
 retrieve ( $index)
 Retrieve the answer for a given captcha. More...
 
 store ( $index, $info)
 Store the correct answer for a given captcha. More...
 

Static Public Member Functions

static get ()
 Get somewhere to store captcha data that will persist between requests. More...
 
static unsetInstanceForTests ()
 

Protected Member Functions

 __construct ()
 Protected constructor: no creating instances except through the factory method above. More...
 

Static Private Attributes

static CaptchaStore $instance
 The singleton instance. More...
 

Detailed Description

Definition at line 3 of file CaptchaStore.php.

Constructor & Destructor Documentation

◆ __construct()

CaptchaStore::__construct ( )
protected

Protected constructor: no creating instances except through the factory method above.

Reimplemented in CaptchaSessionStore.

Definition at line 64 of file CaptchaStore.php.

Member Function Documentation

◆ clear()

CaptchaStore::clear (   $index)
abstract

Delete a result once the captcha has been used, so it cannot be reused.

Parameters
string$index

Reimplemented in CaptchaCacheStore, CaptchaSessionStore, and CaptchaHashStore.

◆ cookiesNeeded()

CaptchaStore::cookiesNeeded ( )
abstract

Whether this type of CaptchaStore needs cookies.

Returns
bool

Reimplemented in CaptchaCacheStore, CaptchaSessionStore, and CaptchaHashStore.

◆ get()

◆ retrieve()

CaptchaStore::retrieve (   $index)
abstract

Retrieve the answer for a given captcha.

Parameters
string$index
Returns
string|false

Reimplemented in CaptchaSessionStore, CaptchaCacheStore, and CaptchaHashStore.

◆ store()

CaptchaStore::store (   $index,
  $info 
)
abstract

Store the correct answer for a given captcha.

Parameters
string$index
string$infothe captcha result

Reimplemented in CaptchaSessionStore, CaptchaHashStore, and CaptchaCacheStore.

◆ unsetInstanceForTests()

static CaptchaStore::unsetInstanceForTests ( )
staticfinal

Member Data Documentation

◆ $instance

CaptchaStore CaptchaStore::$instance
staticprivate

The singleton instance.

Definition at line 34 of file CaptchaStore.php.

Referenced by get().


The documentation for this class was generated from the following file: