Debian Codegraph @

extensions/ConfirmEdit/includes/Store/CaptchaHashStore.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\ConfirmEdit\Store;
4
5 class CaptchaHashStore extends CaptchaStore {
6 /** @var array */
7 protected $data = [];
8
9 /**
10 * @inheritDoc
11 */
12 public function store( $index, $info ) {
13 $this->data[$index] = $info;
14 }
15
16 /**
17 * @inheritDoc
18 */
19 public function retrieve( $index ) {
20 if ( array_key_exists( $index, $this->data ) ) {
21 return $this->data[$index];
22 }
23 return false;
24 }
25
26 /**
27 * @inheritDoc
28 */
29 public function clear( $index ) {
30 unset( $this->data[$index] );
31 }
32
33 public function cookiesNeeded() {
34 return false;
35 }
36
37 public function clearAll() {
38 $this->data = [];
39 }
40 }