-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.production.php
168 lines (126 loc) · 4.66 KB
/
conf.production.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
/*
* This file is part of keranaProject
* Copyright (C) 2017-2018 diemarc diemarc@protonmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace kerana;
defined('__APPFOLDER__') OR exit('Direct access to this file is forbidden, siya');
$config = Configuration::singleton();
/*
|--------------------------------------------------------------------------
| ProductionConfiguration for Kerana
|--------------------------------------------------------------------------
|
*/
/*
|--------------------------------------------------------------------------
| BASICS
|--------------------------------------------------------------------------
|
|
*/
/*
* ---------------------------------------------------------------
* DOCUMENT_ROOT
* ---------------------------------------------------------------
/**
* Configurar el sitio, hay que atender las 3 constantes
* 1 __DOCUMENTROOT__ ; si existe un virtual host que apunte directamente a
* la carpeta application, dejar vacio, en el caso de que es un subdirectorio
* dentro del virtualhost, hay que especificarlo.
* 2 __COREFOLDER__;3 __APPFOLDER__
*/
define('_CONTROLLER_SUFIX_', 'Controller');
define('_MODEL_SUFIX_', 'Model');
/*
* ---------------------------------------------------------------
* CONTROLADOR , MODULO Y ACCION POR DEFECTO
* ---------------------------------------------------------------
*
*/
// controlador por defecto
define('_DEFAULT_MODULE_', 'welcome');
define('_DEFAULT_CONTROLLER_', 'welcome');
define('_DEFAULT_ACTION_', 'index');
// segmentos de url, configuramos en que posicion de la url se encuentra
// informacion sobre el modulo/controller/action
$config->set('position_module',0);
$config->set('position_controller',1);
$config->set('position_action',2);
/*
|--------------------------------------------------------------------------
| SEGURIDAD
|--------------------------------------------------------------------------
|
*/
/**
* -----------------------------------------------------------------------------
* Modulos publicos que no necesitan autentificacion
* -----------------------------------------------------------------------------
*/
$config->set('_public_modules_', [
'web',
'welcome'
]);
/*
* ---------------------------------------------------------------
* Llave AES
* ---------------------------------------------------------------
* Se utiliza para encryptar las constraseñas en mysql o en php
*/
$config->set('_aeskey_', 'vnaT497*_N');
/**
* -----------------------------------------------------------------------------
* Sesiones
* -----------------------------------------------------------------------------
*/
/** @var mixed , nombre de la session a utilizar*/
$config->set('_session_name_', '_keRsess_');
/** @var boolean, si la app esta sobre https, activarlo true */
$config->set('_session_https_', false);
/** @var boolean, para que las cookies no sea accedido desde js,
* nunca poner a false, a no ser que se sepa que se hace */
$config->set('_session_http_only_', true);
/** @var mixed, algoritmo hash para encriptar las sesiones
* usar (hash_algos() para ver los disponibles) */
$config->set('_session_hash_','sha512');
/*
* ---------------------------------------------------------------
* FORMATO DE FECHAS
* ---------------------------------------------------------------
*
*/
define('_FECHAHOY_', 'strftime("%Y-%m-%d-%H-%M-%S",time())');
define('_DATE_FORMAT_', 'DD-MM-YYYY');
define('_NUMBER_FORMAT_', '2|,|.');
/*
* ---------------------------------------------------------------
* PROFILER
* ---------------------------------------------------------------
* Muestra uso de memorias y CPU que usa el script php
*/
define('_ENABLE_PROFILER_', true);
/*
* ---------------------------------------------------------------
* BASES DE DATOS
* ---------------------------------------------------------------
*
*/
$config->set('_dbhost_', 'localhost');
$config->set('_dbname_', '');
$config->set('_dbuser_', '');
$config->set('_dbpass_', '');
$config->set('_dbport_', '3306');