MediaWiki REL1_31
CaptchaHashStore.php
Go to the documentation of this file.
1<?php
2
4 protected $data = [];
5
6 public function store( $index, $info ) {
7 $this->data[$index] = $info;
8 }
9
10 public function retrieve( $index ) {
11 if ( array_key_exists( $index, $this->data ) ) {
12 return $this->data[$index];
13 }
14 return false;
15 }
16
17 public function clear( $index ) {
18 unset( $this->data[$index] );
19 }
20
21 public function cookiesNeeded() {
22 return false;
23 }
24
25 public function clearAll() {
26 $this->data = [];
27 }
28}
cookiesNeeded()
Whether this type of CaptchaStore needs cookies.
retrieve( $index)
Retrieve the answer for a given captcha.
clear( $index)
Delete a result once the captcha has been used, so it cannot be reused.
store( $index, $info)
Store the correct answer for a given captcha.