-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
executable file
·35 lines (32 loc) · 843 Bytes
/
Copy pathbootstrap.php
File metadata and controls
executable file
·35 lines (32 loc) · 843 Bytes
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
<?php
include_once 'config.php';
/**
* Autoloading files
*/
class Autoload
{
public static function loadCore($classname)
{
$classname = strtolower( trim($classname) );
$file = 'core'.DS.$classname.'.php';
if(is_readable($file))
require_once($file);
}
public static function loadModel($classname)
{
$classname = strtolower( trim($classname) );
$file = 'model'.DS.$classname.'.php';
if(is_readable($file))
require_once($file);
}
public static function loadController($classname)
{
$classname = strtolower( trim($classname) );
$file = 'controller'.DS.$classname.'.php';
if(is_readable($file))
require_once($file);
}
}
spl_autoload_register('Autoload::loadCore');
spl_autoload_register('Autoload::loadModel');
spl_autoload_register('Autoload::loadController');