-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
executable file
·67 lines (54 loc) · 2.17 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* DotBoost Technologies Inc.
* DotKernel Application Framework
*
* @category DotKernel
* @package DotKernel
* @copyright Copyright (c) 2009-2015 DotBoost Technologies Inc. (http://www.dotboost.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @version $Id: index.php 924 2015-04-17 15:44:29Z gabi $
*/
/**
* Main public executable wrapper.
* Setup environment, setup index controllers, and load modules to run
* @author DotKernel Team <[email protected]>
*/
// Start counting the time needed to display all content, from the very beginning
$startTime = microtime(true);
// Define application environment
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Define application path
define('APPLICATION_PATH', realpath(dirname(__FILE__)));
//Set error reporting
if(APPLICATION_ENV != 'production') error_reporting(- 1);
//Set include path to library directory
set_include_path(implode(PATH_SEPARATOR, array(APPLICATION_PATH . '/library', get_include_path())));
// Define PATH's (absolute paths) to configuration, controllers, DotKernel, templates directories
define('CONFIGURATION_PATH', APPLICATION_PATH . '/configs');
define('CONTROLLERS_PATH', APPLICATION_PATH . '/controllers');
define('DOTKERNEL_PATH', APPLICATION_PATH . '/DotKernel');
define('TEMPLATES_PATH', APPLICATION_PATH . '/templates');
// Define DIRECTORIES ( relative paths)
define('TEMPLATES_DIR', '/templates');
define('IMAGES_DIR', '/images');
// Load Zend Framework
require_once 'Zend/Loader/Autoloader.php';
$zendLoader = Zend_Loader_Autoloader::getInstance();
//includes all classes in library folder. That class names must start with Dot_
$zendLoader->registerNamespace('Dot_');
// also load plugin classes
$zendLoader->registerNamespace('Plugin_');
// getting the request related params
Dot_Request::setRequestData($_SERVER, $_GET, $_POST);
// initialize the DotKernel Enviromnment
Dot_Kernel::initialize($startTime);
/** Pass control to the controller
.''
._.-.___.' (`\
//( ( `'
'/ )\ ).__. )
' <' `\ ._/'\
` \ \
*/
Dot_Kernel::gallop();