Debian Codegraph @

extensions/ConfirmEdit/includes/Store/CaptchaSessionStore.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Extension\ConfirmEdit\Store;
4
5 use MediaWiki\Session\SessionManager;
6
7 class CaptchaSessionStore extends CaptchaStore {
8 protected function __construct() {
9 // Make sure the session is started
10 SessionManager::getGlobalSession()->persist();
11 }
12
13 /**
14 * @inheritDoc
15 */
16 public function store( $index, $info ) {
17 SessionManager::getGlobalSession()->set( 'captcha' . $index, $info );
18 }
19
20 /**
21 * @inheritDoc
22 */
23 public function retrieve( $index ) {
24 return SessionManager::getGlobalSession()->get( 'captcha' . $index, false );
25 }
26
27 /**
28 * @inheritDoc
29 */
30 public function clear( $index ) {
31 SessionManager::getGlobalSession()->remove( 'captcha' . $index );
32 }
33
34 public function cookiesNeeded() {
35 return true;
36 }
37 }