Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Session\Hook; |
4 | |
5 | use MediaWiki\Request\WebRequest; |
6 | use MediaWiki\Session\SessionInfo; |
7 | |
8 | /** |
9 | * This is a hook handler interface, see docs/Hooks.md. |
10 | * Use the hook name "SessionCheckInfo" to register handlers implementing this interface. |
11 | * |
12 | * @stable to implement |
13 | * @ingroup Hooks |
14 | */ |
15 | interface SessionCheckInfoHook { |
16 | /** |
17 | * Use this hook to validate a MediaWiki\Session\SessionInfo as it's being |
18 | * loaded from storage. |
19 | * |
20 | * @since 1.35 |
21 | * |
22 | * @param string &$reason Rejection reason to be logged |
23 | * @param SessionInfo $info MediaWiki\Session\SessionInfo being validated |
24 | * @param WebRequest $request WebRequest being loaded from |
25 | * @param array|bool $metadata Metadata array for the MediaWiki\Session\Session |
26 | * @param array|bool $data Data array for the MediaWiki\Session\Session |
27 | * @return bool|void True or no return value to continue, or false to prevent |
28 | * the MediaWiki\Session\SessionInfo from being used |
29 | */ |
30 | public function onSessionCheckInfo( &$reason, $info, $request, $metadata, |
31 | $data |
32 | ); |
33 | } |