-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.php
More file actions
34 lines (28 loc) · 934 Bytes
/
index.php
File metadata and controls
34 lines (28 loc) · 934 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
<?php
/**
* index page
*
* @author Paweł Makowski
* @copyright (c) 2010-2011 Paweł Makowski
* @license http://spawnframework.com/license New BSD License
*/
error_reporting(E_ALL|E_STRICT);
date_default_timezone_set('Europe/Warsaw');
define('SPAWNM','2.1.4');
define('ROOT_PATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
include_once(ROOT_PATH . 'Library/Spawn/Loader.php');
include_once(ROOT_PATH . 'Library/Spawn/Router.php');
include_once(ROOT_PATH . 'Library/Spawn/Spawn.php');
set_error_handler( array('\Spawn\Spawn', 'exception') );
set_exception_handler( array('\Spawn\Spawn', 'exception') );
$loader = new \Spawn\Loader;
$loader -> setIncludePath('Library/')
-> setIncludePath('Application/')
-> register();
$spawn = new \Spawn\Spawn;
$spawn -> router = new \Spawn\Router;
$spawn -> loader = $loader;
$spawn -> controller = 'Spawn';
$spawn -> action = 'index';
$spawn -> init();
?>