mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
48a60aa762
Change-Id: I75f34c66f1c1968cfb9a3e1932068ec2420e0fa6
37 lines
648 B
PHP
37 lines
648 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] );
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
public function cookiesNeeded() {
|
|
return false;
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
public function clearAll() {
|
|
$this->data = [];
|
|
}
|
|
}
|