forked from caiomorcego/csscaffold
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
executable file
·50 lines (43 loc) · 1.53 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
45
46
47
48
49
50
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file acts as the front controller for CSScaffold.
*
* It's fairly straightforward. It loads a config file, sets an include path,
* and then runs CSScaffold.
*
* You should be able to pull CSScaffold out and use it however you wish as
* long as the config file is in the right format.
*
* If you're looking to do something unique, like moving files and folders
* around, you'll probably need to change this file or create a custom
* front controller for Scaffold. Just keep in mind that the run method
* NEEDS those three parameters, the SYSPATH constant and all of the required
* files. Apart from that, you should be able to drop it into anything.
*
* @package CSScaffold
*/
# Errors. This is overridden by the debug option later.
ini_set('display_errors', TRUE);
error_reporting(E_ALL & ~E_STRICT);
# Include the config file
include 'config.php';
# Path to the system directory
define('SYSPATH', str_replace('\\', '/', realpath($path['system'])). '/');
# Include the classes
require SYSPATH . 'core/Utils.php';
require SYSPATH . 'core/Benchmark.php';
require SYSPATH . 'core/Module.php';
require SYSPATH . 'core/CSS.php';
require SYSPATH . 'core/Controller.php';
require SYSPATH . 'core/Exception.php';
require SYSPATH . 'vendor/FirePHPCore/fb.php';
require SYSPATH . 'vendor/FirePHPCore/FirePHP.class.php';
# And finally... the one that actually does the work
require SYSPATH . 'controllers/CSScaffold.php';
# And we're off!
if(isset($_GET['request']))
{
CSScaffold::run($_GET, $config, $path);
}