aboutsummaryrefslogtreecommitdiff
path: root/index.php
blob: 20a424cd5aed586bafbaafb31ae08d9a0887f1e9 (plain)
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
<?php


session_start();



require('app/fn/fn.php');


require('./vendor/autoload.php');


$app = new Wcms\Application();
$app->wakeup();
Sentry\init([
    'dsn' => Wcms\Config::sentrydsn(),
    'release' => 'w_cms_v' . getversion(),
    'project_root' => 'app',
]);
Sentry\configureScope(function (Sentry\State\Scope $scope): void {
    $scope->setUser([
        'id' => Wcms\Config::url(),
        'username' => Wcms\Config::basepath(),
    ]);
});

try {
    $matchoper = new Wcms\Routes();
    $matchoper->match();

} catch (Exception $e) {
    Sentry\captureException($e);
    echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n";
}






?>