-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
37 lines (31 loc) · 1.11 KB
/
index.php
File metadata and controls
37 lines (31 loc) · 1.11 KB
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
<?php
/**
* -----------------------------------------------------------------------------
* Rev Framework
* -----------------------------------------------------------------------------
* @author Kryptos (http://twitter.com/_Kryptos)
* @copyright (c) 2015 Kryptos (http://github.com/Kryptos)
* @license MIT
* -----------------------------------------------------------------------------
*/
define('SITE', __DIR__);
require_once 'Rev/Bootstrap.php';
/**
* ------------------
* Klein
* ------------------
*/
$klein = new \Klein\Klein;
$klein->respond('/', function ($request) {
if(isset($GLOBALS['argv'])) {
$class = Rev\Configure::$Config->site->theme . '\\' . 'cli';
} else {
$class = Rev\Configure::$Config->site->theme . '\\' . 'index';
}
new $class;
});
$klein->respond('/[:page]', function ($request) {
$class = Rev\Configure::$Config->site->theme . '\\' . $request->page;
new $class;
});
$klein->dispatch();