-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
executable file
·34 lines (32 loc) · 886 Bytes
/
bootstrap.php
File metadata and controls
executable file
·34 lines (32 loc) · 886 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
<?php
/*
* get information about directory BS Framework are
*/
define( 'SYS_PATH', dirname(__FILE__) );
$pathinfo = pathinfo(SYS_PATH);
/*
* load the BS Framework configuration
*/
require_once SYS_PATH.'/Config/system.conf.php';
/**
*
* autoload to BS Framework Objects
* @param string $name
*/
function _bsautoload_($name) {
global $pathinfo;
$searchpath = explode('\\', $name);
$name = array_pop( $searchpath );
$searchpath = $pathinfo['dirname'].DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR,$searchpath).DIRECTORY_SEPARATOR;
try{
if(file_exists("{$searchpath}{$name}.php")){
require_once("{$searchpath}{$name}.php");
}
}catch(Exception $E){
\BlueSeed\View::render('system_notfound');
}
}
/**
* register this autoload function in spl_registers
*/
spl_autoload_register('_bsautoload_');