-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
44 lines (37 loc) · 1.21 KB
/
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
40
41
42
43
44
<?php
use lithium\action\Dispatcher;
use lithium\action\Request;
use lithium\core\Libraries;
/**
* This is the path to the class libraries used by your application, and must contain a copy of the
* Lithium core. By default, this directory is named `libraries`, and resides in the same
* directory as your application. If you use the same libraries in multiple applications, you can
* set this to a shared path on your server.
*/
define('LITHIUM_LIBRARY_PATH', dirname(__DIR__) . '/libraries');
/**
* Locate and load Lithium core library files. Throws a fatal error if the core can't be found.
* If your Lithium core directory is named something other than 'lithium', change the string below.
*/
if (!include LITHIUM_LIBRARY_PATH . '/lithium/core/Libraries.php') {
$message = "Lithium core could not be found. Check the value of LITHIUM_LIBRARY_PATH in ";
$message .= __FILE__ . ". It should point to the directory containing your ";
$message .= "/libraries directory.";
throw new ErrorException($message);
}
/**
* Add Lithium
*/
Libraries::add('lithium');
/**
* Include routes
*/
include 'routes.php';
/**
* Include filters
*/
include 'filters.php';
/**
* Run It!
*/
echo Dispatcher::run(new Request());