forked from wikimedia/mediawiki-extensions-ConfirmAccount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfirmAccount.setup.php
61 lines (54 loc) · 2.29 KB
/
ConfirmAccount.setup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* Class containing basic setup functions.
*/
class ConfirmAccountSetup {
/**
* Register source code paths.
* This function must NOT depend on any config vars.
*
* @param array &$classes
* @param array &$messagesDirs
* @param array &$messagesFiles
*/
public static function defineSourcePaths(
array &$classes, array &$messagesDirs, array &$messagesFiles
) {
$dir = __DIR__;
# Basic directory layout
$backendDir = "$dir/backend";
$schemaDir = "$dir/backend/schema";
$businessDir = "$dir/business";
$frontendDir = "$dir/frontend";
$langDir = "$dir/frontend/language";
$spActionDir = "$dir/frontend/specialpages/actions";
# Main i18n file and special page alias file
$messagesDirs['ConfirmAccount'] = __DIR__ . '/i18n/core';
$messagesFiles['ConfirmAccountAliases'] = "$langDir/ConfirmAccount.alias.php";
# UI setup class
$classes['ConfirmAccountUISetup'] = "$frontendDir/ConfirmAccountUI.setup.php";
# UI event handler classes
$classes['ConfirmAccountUIHooks'] = "$frontendDir/ConfirmAccountUI.hooks.php";
# UI to request an account
$classes['RequestAccountPage'] = "$spActionDir/RequestAccount_body.php";
$messagesDirs['RequestAccountPage'] = __DIR__ . '/i18n/requestaccount';
# UI to confirm accounts
$classes['ConfirmAccountsPage'] = "$spActionDir/ConfirmAccount_body.php";
$classes['ConfirmAccountsPager'] = "$spActionDir/ConfirmAccountsPager.php";
$messagesDirs['ConfirmAccountPage'] = __DIR__ . '/i18n/confirmaccount';
# UI to see account credentials
$classes['UserCredentialsPage'] = "$spActionDir/UserCredentials_body.php";
$messagesDirs['UserCredentialsPage'] = __DIR__ . '/i18n/usercredentials';
# Utility functions
$classes['ConfirmAccount'] = "$backendDir/ConfirmAccount.class.php";
# Data access objects
$classes['UserAccountRequest'] = "$backendDir/UserAccountRequest.php";
# Business logic
$classes['AccountRequestSubmission'] = "$businessDir/AccountRequestSubmission.php";
$classes['AccountConfirmSubmission'] = "$businessDir/AccountConfirmSubmission.php";
$classes['ConfirmAccountPreAuthenticationProvider'] =
"$businessDir/ConfirmAccountPreAuthenticationProvider.php";
# Schema changes
$classes['ConfirmAccountUpdaterHooks'] = "$schemaDir/ConfirmAccountUpdater.hooks.php";
}
}