forked from vanilla/vanilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (30 loc) · 879 Bytes
/
index.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
<?php
/**
* Application Gateway.
*
* @copyright 2009-2019 Vanilla Forums Inc.
* @license GPL-2.0-only
* @package Core
* @since 2.0
*/
// Report and track all errors.
use Vanilla\Utility\Timers;
error_reporting(E_ALL);
ini_set("display_errors", 0);
ini_set("track_errors", 1);
set_time_limit(30);
ob_start();
// Minimal environment needed to use most of Vanilla's framework.
require_once __DIR__ . "/environment.php";
// Disable Phar stream
stream_wrapper_unregister("phar");
// Require the bootstrap to configure the application.
require_once __DIR__ . "/bootstrap.php";
$timers = \Gdn::getContainer()->get(Timers::class);
// Create and configure the dispatcher.
$dispatchStartTimer = $timers->startGeneric("start-dispatcher");
$dispatcher = Gdn::dispatcher();
// Process the request.
$dispatcher->start();
$dispatchStartTimer->finish();
$dispatcher->dispatch();