]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | /* This Source Code Form is subject to the terms of the Mozilla Public | |
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, | |
4 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
5 | ||
6 | // error reporting (for testing) | |
7 | ini_set('display_errors', 1); error_reporting(E_ALL); | |
8 | ||
9 | // Extended DOM document class | |
10 | require_once(__DIR__.'/../php-utility-classes/classes/document.php-class'); | |
11 | // Class for sending emails | |
12 | require_once(__DIR__.'/../php-utility-classes/classes/email.php-class'); | |
13 | // Composer-provided libraries (oauth2-server-php, doctrine DBAL) | |
14 | require_once(__DIR__.'/../vendor/autoload.php'); | |
15 | // Authentication utilities | |
16 | require_once(__DIR__.'/authutils.php-class'); | |
17 | // Instantiate server utils. | |
18 | try { | |
19 | $utils = new AuthUtils(); | |
20 | $db = $utils->db; | |
21 | $settings = $utils->settings; | |
22 | } | |
23 | catch (Exception $e) { | |
24 | $utils = null; | |
25 | print('Failed to set up utilities: '.$e->getMessage()); | |
26 | exit(1); | |
27 | } | |
28 | ||
29 | $utils->setUpL10n(); | |
30 | ||
31 | // Set up our OAuth2 Server object | |
32 | $server = $utils->getOAuthServer(); | |
33 | ?> |