-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathindex.php
More file actions
42 lines (32 loc) · 981 Bytes
/
index.php
File metadata and controls
42 lines (32 loc) · 981 Bytes
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
namespace FeatherBB;
use FeatherBB\Core\Interfaces\Feather;
use FeatherBB\Core\Interfaces\SlimStatic;
use FeatherBB\Middleware\Auth;
use FeatherBB\Middleware\Core;
use FeatherBB\Middleware\Csrf;
use FeatherBB\Middleware\RedirectNonTrailingSlash;
use Slim\App;
/**
* Copyright (C) 2015-2019 FeatherBB
* based on code by (C) 2008-2015 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
// Start a session for flash messages
session_cache_limiter(false);
session_start();
// Load Conposer dependencies
require 'vendor/autoload.php';
// Instantiate Slim
SlimStatic::boot(new App);
// Allow static proxies to be called from anywhere in App
Statical::addNamespace('*', __NAMESPACE__.'\\*');
Feather::add(new RedirectNonTrailingSlash);
Feather::add(new Csrf);
Feather::add(new Auth);
Feather::add(new Core);
// Load the routes
require 'featherbb/routes.php';
// Run it, baby!
Feather::run();