mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 17:40:11 +00:00
d648372f7f
Change-Id: Idc03460327095e19438fd9a3a542bf4229db4be2
38 lines
557 B
PHP
38 lines
557 B
PHP
<?php
|
|
|
|
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 = [];
|
|
}
|
|
}
|