-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
54 lines (37 loc) · 1007 Bytes
/
config.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
<?php
//autoload das bibliotecas do composer
require_once("vendor/autoload.php");
/**
* carrega os controllers
* @param type function($nameClass
*/
spl_autoload_register(function($nameClass){
$dirClass = "class/Controller";
$filename = str_replace ("\\", "/", $dirClass . DIRECTORY_SEPARATOR . $nameClass . ".class.php");
if(file_exists($filename)){
require_once($filename);
}
});
/**
* carrega os models
* @param type function($nameClass
*/
spl_autoload_register(function($nameClass){
$dirClass = "class/Model";
$filename = str_replace ("\\", "/", $dirClass . DIRECTORY_SEPARATOR . $nameClass . ".class.php");
if(file_exists($filename)){
require_once($filename);
}
});
/**
* carrega os views
* @param type function($nameClass
*/
spl_autoload_register(function($nameClass){
$dirClass = "class/View";
$filename = str_replace ("\\", "/", $dirClass . DIRECTORY_SEPARATOR . $nameClass . ".class.php");
if(file_exists($filename)){
require_once($filename);
}
});
?>