mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-30 19:04:29 +00:00
30cd1d8a23
Change-Id: I3fa9747e0ea970c5de39e2da8603e1bba9388a69
40 lines
607 B
PHP
40 lines
607 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\ConfirmEdit\Store;
|
|
|
|
class CaptchaHashStore extends CaptchaStore {
|
|
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 = [];
|
|
}
|
|
}
|