mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-12 00:06:24 +00:00
29103eecde
Change-Id: Ic7872cd2539dc79f88c70548cbd82d9de98f66b0
41 lines
626 B
PHP
41 lines
626 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\ConfirmEdit\Store;
|
|
|
|
class CaptchaHashStore extends CaptchaStore {
|
|
/** @var array */
|
|
protected $data = [];
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function store( $index, $info ) {
|
|
$this->data[$index] = $info;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function retrieve( $index ) {
|
|
if ( array_key_exists( $index, $this->data ) ) {
|
|
return $this->data[$index];
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function clear( $index ) {
|
|
unset( $this->data[$index] );
|
|
}
|
|
|
|
public function cookiesNeeded() {
|
|
return false;
|
|
}
|
|
|
|
public function clearAll() {
|
|
$this->data = [];
|
|
}
|
|
}
|