MediaWiki REL1_34
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.
 
 cookiesNeeded ()
 Whether this type of CaptchaStore needs cookies.
 
 retrieve ( $index)
 Retrieve the answer for a given captcha.
 
 store ( $index, $info)
 Store the correct answer for a given captcha.
 

Static Public Member Functions

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

Protected Member Functions

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

Static Private Attributes

static CaptchaStore $instance
 The singleton instance.
 

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 CaptchaCacheStore, and 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, CaptchaHashStore, and CaptchaSessionStore.

◆ cookiesNeeded()

CaptchaStore::cookiesNeeded ( )
abstract

Whether this type of CaptchaStore needs cookies.

Returns
bool

Reimplemented in CaptchaCacheStore, CaptchaHashStore, and CaptchaSessionStore.

◆ get()

◆ retrieve()

CaptchaStore::retrieve ( $index)
abstract

Retrieve the answer for a given captcha.

Parameters
string$index
Returns
array|false

Reimplemented in CaptchaCacheStore, CaptchaHashStore, and CaptchaSessionStore.

◆ store()

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

Store the correct answer for a given captcha.

Parameters
string$index
array$infothe captcha result

Reimplemented in CaptchaCacheStore, CaptchaHashStore, and CaptchaSessionStore.

◆ 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: