@@ -21,21 +21,21 @@ discard block |
||
21 | 21 | * You should have received a copy of the GNU General Public License |
22 | 22 | * along with this program; if not, write to the Free Software |
23 | 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
24 | - */ |
|
24 | + */ |
|
25 | 25 | |
26 | 26 | error_reporting(E_ALL | E_STRICT); |
27 | 27 | ini_set('display_errors', 1); |
28 | 28 | |
29 | 29 | /** |
30 | - * the directory separator, under windows it is \ and unix, linux / |
|
31 | - */ |
|
30 | + * the directory separator, under windows it is \ and unix, linux / |
|
31 | + */ |
|
32 | 32 | define('DS', DIRECTORY_SEPARATOR); |
33 | 33 | |
34 | 34 | /** |
35 | - * The root directory of the application. |
|
36 | - * |
|
37 | - * you can place this directory outside of your web directory, for example "/home/your_app", etc. |
|
38 | - */ |
|
35 | + * The root directory of the application. |
|
36 | + * |
|
37 | + * you can place this directory outside of your web directory, for example "/home/your_app", etc. |
|
38 | + */ |
|
39 | 39 | define('ROOT_PATH', dirname(realpath(__FILE__)) . DS .'..' . DS); |
40 | 40 | |
41 | 41 | |
@@ -44,176 +44,176 @@ discard block |
||
44 | 44 | |
45 | 45 | |
46 | 46 | /** |
47 | - * The path to the directory. |
|
48 | - * |
|
49 | - * That contains your static files (javascript, css, images, etc.) |
|
50 | - * Note: the path must be relative to the file index.php (the front-end controller). |
|
51 | - */ |
|
47 | + * The path to the directory. |
|
48 | + * |
|
49 | + * That contains your static files (javascript, css, images, etc.) |
|
50 | + * Note: the path must be relative to the file index.php (the front-end controller). |
|
51 | + */ |
|
52 | 52 | define('ASSETS_PATH', 'assets/'); |
53 | 53 | |
54 | 54 | /** |
55 | - * The path to the directory of your cache files. |
|
56 | - * |
|
57 | - * This feature is available currently for database and views. |
|
58 | - */ |
|
55 | + * The path to the directory of your cache files. |
|
56 | + * |
|
57 | + * This feature is available currently for database and views. |
|
58 | + */ |
|
59 | 59 | define('CACHE_PATH', ROOT_PATH . 'cache' . DS); |
60 | 60 | |
61 | 61 | /** |
62 | - * Custom application path for tests |
|
63 | - */ |
|
62 | + * Custom application path for tests |
|
63 | + */ |
|
64 | 64 | define('APPS_PATH', TESTS_PATH .'hmvc' . DS); |
65 | 65 | |
66 | 66 | /** |
67 | - * The path to the controller directory of your application. |
|
68 | - * |
|
69 | - * If you already know the MVC architecture you know what a controller means; |
|
70 | - * it is he who makes the business logic of your application in general. |
|
71 | - */ |
|
67 | + * The path to the controller directory of your application. |
|
68 | + * |
|
69 | + * If you already know the MVC architecture you know what a controller means; |
|
70 | + * it is he who makes the business logic of your application in general. |
|
71 | + */ |
|
72 | 72 | define('APPS_CONTROLLER_PATH', APPS_PATH . 'controllers' . DS); |
73 | 73 | |
74 | 74 | /** |
75 | - * The path to the directory of your model classes of your application. |
|
76 | - * |
|
77 | - * If you already know the MVC architecture you know what a model means; |
|
78 | - * it's the one who interacts with the database, in one word persistent data from your application. |
|
79 | - */ |
|
75 | + * The path to the directory of your model classes of your application. |
|
76 | + * |
|
77 | + * If you already know the MVC architecture you know what a model means; |
|
78 | + * it's the one who interacts with the database, in one word persistent data from your application. |
|
79 | + */ |
|
80 | 80 | define('APPS_MODEL_PATH', APPS_PATH . 'models' . DS); |
81 | 81 | |
82 | 82 | /** |
83 | - * The path to the directory of your views. |
|
84 | - * |
|
85 | - * If you already know the MVC architecture you know what a view means, |
|
86 | - * a view is just a user interface (html page, form, etc.) that is to say |
|
87 | - * everything displayed in the browser interface, etc. |
|
88 | - */ |
|
83 | + * The path to the directory of your views. |
|
84 | + * |
|
85 | + * If you already know the MVC architecture you know what a view means, |
|
86 | + * a view is just a user interface (html page, form, etc.) that is to say |
|
87 | + * everything displayed in the browser interface, etc. |
|
88 | + */ |
|
89 | 89 | define('APPS_VIEWS_PATH', APPS_PATH . 'views' . DS); |
90 | 90 | |
91 | 91 | /** |
92 | - * The path to the configuration directory. |
|
93 | - * |
|
94 | - * That contains most of the configuration files for your |
|
95 | - * application (database, class loading file, functions, etc.) |
|
96 | - */ |
|
92 | + * The path to the configuration directory. |
|
93 | + * |
|
94 | + * That contains most of the configuration files for your |
|
95 | + * application (database, class loading file, functions, etc.) |
|
96 | + */ |
|
97 | 97 | define('CONFIG_PATH', ROOT_PATH . 'config' . DS); |
98 | 98 | |
99 | 99 | /** |
100 | - * The core directory |
|
101 | - * |
|
102 | - * It is recommended to put this folder out of the web directory of your server and |
|
103 | - * you should not change its content because in case of update you could lose the modified files. |
|
104 | - */ |
|
100 | + * The core directory |
|
101 | + * |
|
102 | + * It is recommended to put this folder out of the web directory of your server and |
|
103 | + * you should not change its content because in case of update you could lose the modified files. |
|
104 | + */ |
|
105 | 105 | define('CORE_PATH', ROOT_PATH . 'core' . DS); |
106 | 106 | |
107 | 107 | /** |
108 | - * The path to the directory of core classes that used by the system. |
|
109 | - * |
|
110 | - * It contains PHP classes that are used by the framework internally. |
|
111 | - */ |
|
108 | + * The path to the directory of core classes that used by the system. |
|
109 | + * |
|
110 | + * It contains PHP classes that are used by the framework internally. |
|
111 | + */ |
|
112 | 112 | define('CORE_CLASSES_PATH', CORE_PATH . 'classes' . DS); |
113 | 113 | |
114 | 114 | /** |
115 | - * The path to the directory of core classes for the cache used by the system. |
|
116 | - * |
|
117 | - * It contains PHP classes for the cache drivers. |
|
118 | - */ |
|
115 | + * The path to the directory of core classes for the cache used by the system. |
|
116 | + * |
|
117 | + * It contains PHP classes for the cache drivers. |
|
118 | + */ |
|
119 | 119 | define('CORE_CLASSES_CACHE_PATH', CORE_CLASSES_PATH . 'cache' . DS); |
120 | 120 | |
121 | 121 | /** |
122 | - * The path to the directory of core classes for the model used by the system. |
|
123 | - * |
|
124 | - * It contains PHP classes for the models. |
|
125 | - */ |
|
122 | + * The path to the directory of core classes for the model used by the system. |
|
123 | + * |
|
124 | + * It contains PHP classes for the models. |
|
125 | + */ |
|
126 | 126 | define('CORE_CLASSES_MODEL_PATH', CORE_CLASSES_PATH . 'model' . DS); |
127 | 127 | |
128 | 128 | /** |
129 | - * The path to the directory of functions or helper systems. |
|
130 | - * |
|
131 | - * It contains PHP functions that perform a particular task: character string processing, URL, etc. |
|
132 | - */ |
|
129 | + * The path to the directory of functions or helper systems. |
|
130 | + * |
|
131 | + * It contains PHP functions that perform a particular task: character string processing, URL, etc. |
|
132 | + */ |
|
133 | 133 | define('CORE_FUNCTIONS_PATH', CORE_PATH . 'functions' . DS); |
134 | 134 | |
135 | 135 | /** |
136 | - * The path to the core directory of languages files. |
|
137 | - * |
|
138 | - */ |
|
136 | + * The path to the core directory of languages files. |
|
137 | + * |
|
138 | + */ |
|
139 | 139 | define('CORE_LANG_PATH', CORE_PATH . 'lang' . DS); |
140 | 140 | |
141 | 141 | /** |
142 | - * The path to the system library directory. |
|
143 | - * |
|
144 | - * Which contains the libraries most often used in your web application, as for the |
|
145 | - * core directory it is advisable to put it out of the root directory of your application. |
|
146 | - */ |
|
142 | + * The path to the system library directory. |
|
143 | + * |
|
144 | + * Which contains the libraries most often used in your web application, as for the |
|
145 | + * core directory it is advisable to put it out of the root directory of your application. |
|
146 | + */ |
|
147 | 147 | define('CORE_LIBRARY_PATH', CORE_PATH . 'libraries' . DS); |
148 | 148 | |
149 | 149 | /** |
150 | - * The path to the system view directory. |
|
151 | - * |
|
152 | - * That contains the views used for the system, such as error messages, and so on. |
|
153 | - */ |
|
150 | + * The path to the system view directory. |
|
151 | + * |
|
152 | + * That contains the views used for the system, such as error messages, and so on. |
|
153 | + */ |
|
154 | 154 | define('CORE_VIEWS_PATH', CORE_PATH . 'views' . DS); |
155 | 155 | |
156 | 156 | /** |
157 | - * The path to the directory of your PHP personal functions or helper. |
|
158 | - * |
|
159 | - * It contains your PHP functions that perform a particular task: utilities, etc. |
|
160 | - * Note: Do not put your personal functions or helpers in the system functions directory, |
|
161 | - * because if you update the system you may lose them. |
|
162 | - */ |
|
157 | + * The path to the directory of your PHP personal functions or helper. |
|
158 | + * |
|
159 | + * It contains your PHP functions that perform a particular task: utilities, etc. |
|
160 | + * Note: Do not put your personal functions or helpers in the system functions directory, |
|
161 | + * because if you update the system you may lose them. |
|
162 | + */ |
|
163 | 163 | define('FUNCTIONS_PATH', ROOT_PATH . 'functions' . DS); |
164 | 164 | |
165 | 165 | /** |
166 | - * The path to the app directory of personal language. |
|
167 | - * |
|
168 | - * This feature is not yet available. |
|
169 | - * You can help us do this if you are nice or wish to see the developed framework. |
|
170 | - */ |
|
166 | + * The path to the app directory of personal language. |
|
167 | + * |
|
168 | + * This feature is not yet available. |
|
169 | + * You can help us do this if you are nice or wish to see the developed framework. |
|
170 | + */ |
|
171 | 171 | define('APP_LANG_PATH', ROOT_PATH . 'lang' . DS); |
172 | 172 | |
173 | 173 | /** |
174 | - * The path to the directory of your personal libraries |
|
175 | - * |
|
176 | - * It contains your PHP classes, package, etc. |
|
177 | - * Note: you should not put your personal libraries in the system library directory, |
|
178 | - * because it is recalled in case of updating the system you might have surprises. |
|
179 | - */ |
|
174 | + * The path to the directory of your personal libraries |
|
175 | + * |
|
176 | + * It contains your PHP classes, package, etc. |
|
177 | + * Note: you should not put your personal libraries in the system library directory, |
|
178 | + * because it is recalled in case of updating the system you might have surprises. |
|
179 | + */ |
|
180 | 180 | define('LIBRARY_PATH', ROOT_PATH . 'libraries' . DS); |
181 | 181 | |
182 | 182 | /** |
183 | - * The path to the directory that contains the log files. |
|
184 | - * |
|
185 | - * Note: This directory must be available in writing and if possible must have as owner the user who launches your web server, |
|
186 | - * under unix or linux most often with the apache web server it is "www-data" or "httpd" even "nobody" for more |
|
187 | - * details see the documentation of your web server. |
|
188 | - * Example for Unix or linux with apache web server: |
|
189 | - * # chmod -R 700 /path/to/your/logs/directory/ |
|
190 | - * # chown -R www-data:www-data /path/to/your/logs/directory/ |
|
191 | - */ |
|
183 | + * The path to the directory that contains the log files. |
|
184 | + * |
|
185 | + * Note: This directory must be available in writing and if possible must have as owner the user who launches your web server, |
|
186 | + * under unix or linux most often with the apache web server it is "www-data" or "httpd" even "nobody" for more |
|
187 | + * details see the documentation of your web server. |
|
188 | + * Example for Unix or linux with apache web server: |
|
189 | + * # chmod -R 700 /path/to/your/logs/directory/ |
|
190 | + * # chown -R www-data:www-data /path/to/your/logs/directory/ |
|
191 | + */ |
|
192 | 192 | define('LOGS_PATH', ROOT_PATH . 'logs' . DS); |
193 | 193 | |
194 | 194 | /** |
195 | - * The path to the modules directory. |
|
196 | - * |
|
197 | - * It contains your modules used files (config, controllers, libraries, etc.) that is to say which contains your files of the modules, |
|
198 | - * in HMVC architecture (hierichical, controllers, models, views). |
|
199 | - */ |
|
195 | + * The path to the modules directory. |
|
196 | + * |
|
197 | + * It contains your modules used files (config, controllers, libraries, etc.) that is to say which contains your files of the modules, |
|
198 | + * in HMVC architecture (hierichical, controllers, models, views). |
|
199 | + */ |
|
200 | 200 | define('MODULE_PATH', dirname(realpath(__FILE__)) . DS .'hmvc' . DS . 'modules' . DS); |
201 | 201 | |
202 | 202 | /** |
203 | - * The path to the directory of sources external to your application. |
|
204 | - * |
|
205 | - * If you have already used "composer" you know what that means. |
|
206 | - */ |
|
203 | + * The path to the directory of sources external to your application. |
|
204 | + * |
|
205 | + * If you have already used "composer" you know what that means. |
|
206 | + */ |
|
207 | 207 | define('VENDOR_PATH', ROOT_PATH . 'vendor' . DS); |
208 | 208 | |
209 | 209 | /** |
210 | - * The front controller of your application. |
|
211 | - * |
|
212 | - * "index.php" it is through this file that all the requests come, there is a possibility to hidden it in the url of |
|
213 | - * your application by using the rewrite module URL of your web server . |
|
214 | - * For example, under apache web server, there is a configuration example file that is located at the root |
|
215 | - * of your framework folder : "htaccess.txt" rename it to ".htaccess". |
|
216 | - */ |
|
210 | + * The front controller of your application. |
|
211 | + * |
|
212 | + * "index.php" it is through this file that all the requests come, there is a possibility to hidden it in the url of |
|
213 | + * your application by using the rewrite module URL of your web server . |
|
214 | + * For example, under apache web server, there is a configuration example file that is located at the root |
|
215 | + * of your framework folder : "htaccess.txt" rename it to ".htaccess". |
|
216 | + */ |
|
217 | 217 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
218 | 218 | |
219 | 219 | /** |
@@ -222,14 +222,14 @@ discard block |
||
222 | 222 | define('IS_CLI', stripos('cli', php_sapi_name()) !== false); |
223 | 223 | |
224 | 224 | /** |
225 | - * The environment of your application (production, test, development). |
|
226 | - * |
|
227 | - * if your application is still in development you use the value "development" |
|
228 | - * so you will have the display of the error messages, etc. |
|
229 | - * Once you finish the development of your application that is to put it online |
|
230 | - * you change this value to "production" or "testing", in this case there will be deactivation of error messages, |
|
231 | - * the loading of the system, will be fast. |
|
232 | - */ |
|
225 | + * The environment of your application (production, test, development). |
|
226 | + * |
|
227 | + * if your application is still in development you use the value "development" |
|
228 | + * so you will have the display of the error messages, etc. |
|
229 | + * Once you finish the development of your application that is to put it online |
|
230 | + * you change this value to "production" or "testing", in this case there will be deactivation of error messages, |
|
231 | + * the loading of the system, will be fast. |
|
232 | + */ |
|
233 | 233 | define('ENVIRONMENT', 'testing'); |
234 | 234 | |
235 | 235 | |
@@ -260,13 +260,13 @@ discard block |
||
260 | 260 | require_once 'include/testsUtil.php'; |
261 | 261 | |
262 | 262 | /** |
263 | - * Setting of the PHP error message handling function |
|
264 | - */ |
|
263 | + * Setting of the PHP error message handling function |
|
264 | + */ |
|
265 | 265 | set_error_handler('php_error_handler'); |
266 | 266 | |
267 | 267 | /** |
268 | - * Setting of the PHP error exception handling function |
|
269 | - */ |
|
268 | + * Setting of the PHP error exception handling function |
|
269 | + */ |
|
270 | 270 | set_exception_handler('php_exception_handler'); |
271 | 271 | |
272 | 272 | /** |