MediaWiki REL1_34
CaptchaCacheStore Class Reference
Inheritance diagram for CaptchaCacheStore:
Collaboration diagram for CaptchaCacheStore:

Public Member Functions

 __construct ()
 Protected constructor: no creating instances except through the factory method above.
 
 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.
 

Private Attributes

BagOStuff $cache
 

Additional Inherited Members

- Static Public Member Functions inherited from CaptchaStore
static get ()
 Get somewhere to store captcha data that will persist between requests.
 
static unsetInstanceForTests ()
 

Detailed Description

Definition at line 5 of file CaptchaCacheStore.php.

Constructor & Destructor Documentation

◆ __construct()

CaptchaCacheStore::__construct ( )

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

Reimplemented from CaptchaStore.

Definition at line 9 of file CaptchaCacheStore.php.

Member Function Documentation

◆ clear()

CaptchaCacheStore::clear ( $index)

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

Parameters
string$index

Reimplemented from CaptchaStore.

Definition at line 36 of file CaptchaCacheStore.php.

References $cache, BagOStuff\delete(), and BagOStuff\makeKey().

◆ cookiesNeeded()

CaptchaCacheStore::cookiesNeeded ( )

Whether this type of CaptchaStore needs cookies.

Returns
bool

Reimplemented from CaptchaStore.

Definition at line 41 of file CaptchaCacheStore.php.

◆ retrieve()

CaptchaCacheStore::retrieve ( $index)

Retrieve the answer for a given captcha.

Parameters
string$index
Returns
array|false

Reimplemented from CaptchaStore.

Definition at line 26 of file CaptchaCacheStore.php.

References $cache, BagOStuff\get(), and BagOStuff\makeKey().

◆ store()

CaptchaCacheStore::store ( $index,
$info )

Store the correct answer for a given captcha.

Parameters
string$index
array$infothe captcha result

Reimplemented from CaptchaStore.

Definition at line 15 of file CaptchaCacheStore.php.

References $cache, BagOStuff\makeKey(), and BagOStuff\set().

Member Data Documentation

◆ $cache

BagOStuff CaptchaCacheStore::$cache
private

Definition at line 7 of file CaptchaCacheStore.php.

Referenced by clear(), retrieve(), and store().


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