-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
81 lines (73 loc) · 2.33 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* KumbiaPHP web & app Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://wiki.kumbiaphp.com/Licencia
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@kumbiaphp.com so we can send you a copy immediately.
*
* @copyright Copyright (c) 2005-2010 Kumbia Team (http://www.kumbiaphp.com)
* @license http://wiki.kumbiaphp.com/Licencia New BSD License
*/
/**
* Indicar si la aplicacion se encuentra en produccion
* directamente desde el index.php
*/
//define('PRODUCTION', TRUE);
/**
* Establece política de informe de errores
*/
//error_reporting(0); // Usar este en producción, no envia errores
error_reporting(E_ALL ^ E_STRICT); // Comentar en producción
//comentar la siguiente linea en producción
ini_set('display_errors', 'On');
/**
* Define marca de tiempo en que inicio el Request
*/
define('START_TIME', microtime(1));
/**
* Define el APP_PATH
*
* APP_PATH:
* - Ruta al directorio de la aplicación (por defecto la ruta al directorio app)
* - Esta ruta se utiliza para cargar los archivos de la aplicacion
*/
define('APP_PATH', dirname(dirname(__FILE__)) . '/app/');
/**
* Define el CORE_PATH
*
* CORE_PATH:
* - Ruta al directorio que contiene el núcleo de Kumbia (por defecto la ruta al directorio core)
*/
define('CORE_PATH', dirname(dirname(APP_PATH)) . '/core/');
/**
* Define el PUBLIC_PATH
*
* PUBLIC_PATH:
* - Path para genera la Url en los links a acciones y controladores
* - Esta ruta la utiliza Kumbia como base para generar las Urls para acceder de lado de
* cliente (con el navegador web) y es relativa al DOCUMENT_ROOT del servidor web
*/
if ($_SERVER['QUERY_STRING']) {
define('PUBLIC_PATH', substr(urldecode($_SERVER['REQUEST_URI']), 0, - strlen($_SERVER['QUERY_STRING']) + 6));
} else {
define('PUBLIC_PATH', $_SERVER['REQUEST_URI']);
}
/**
* Obtiene la url
*/
$url = isset($_GET['_url']) ? $_GET['_url'] : '/';
/**
* Carga el gestor de arranque
* Por defecto el bootstrap del core
*
* @see Bootstrap
*/
//require APP_PATH . 'libs/bootstrap.php'; //bootstrap de app
require CORE_PATH . 'kumbia/bootstrap.php'; //bootstrap del core