Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * Routing support for Moodle.
19
 *
20
 * @package    core
21
 * @copyright  2023 Andrew Lyons <andrew@nicols.co.uk>
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
// phpcs:disable moodle.Files.MoodleInternal.MoodleInternalGlobalState
25
 
26
// Load the bootstrap and perform the bare early setup.
27
// This just sets up the autoloaders, basic configuration, and so on.
28
define('ABORT_AFTER_CONFIG', true);
29
require_once('config.php');
30
 
31
// Load the rest of the setup.
32
require_once("{$CFG->libdir}/setuplib.php");        // Functions that MUST be loaded first.
33
 
34
// Load up standard libraries.
35
require_once("{$CFG->libdir}/filterlib.php");       // Functions for filtering test as it is output.
36
require_once("{$CFG->libdir}/ajax/ajaxlib.php");    // Functions for managing our use of JavaScript and YUI.
37
require_once("{$CFG->libdir}/weblib.php");          // Functions relating to HTTP and content.
38
require_once("{$CFG->libdir}/outputlib.php");       // Functions for generating output.
39
require_once("{$CFG->libdir}/navigationlib.php");   // Class for generating Navigation structure.
40
require_once("{$CFG->libdir}/dmllib.php");          // Database access.
41
require_once("{$CFG->libdir}/datalib.php");         // Legacy lib with a big-mix of functions.
42
require_once("{$CFG->libdir}/accesslib.php");       // Access control functions.
43
require_once("{$CFG->libdir}/deprecatedlib.php");   // Deprecated functions included for backward compatibility.
44
require_once("{$CFG->libdir}/moodlelib.php");       // Other general-purpose functions.
45
require_once("{$CFG->libdir}/enrollib.php");        // Enrolment related functions.
46
require_once("{$CFG->libdir}/pagelib.php");         // Library that defines the moodle_page class, used for $PAGE.
47
require_once("{$CFG->libdir}/blocklib.php");        // Library for controlling blocks.
48
require_once("{$CFG->libdir}/grouplib.php");        // Groups functions.
49
require_once("{$CFG->libdir}/sessionlib.php");      // All session and cookie related stuff.
50
require_once("{$CFG->libdir}/editorlib.php");       // All text editor related functions and classes.
51
require_once("{$CFG->libdir}/messagelib.php");      // Messagelib functions.
52
require_once("{$CFG->libdir}/modinfolib.php");      // Cached information on course-module instances.
53
 
54
$router = \core\di::get(\core\router::class);
55
$router->serve();