-
Notifications
You must be signed in to change notification settings - Fork 0
BootStrap do Framework
iannsp edited this page Sep 14, 2011
·
1 revision
<?php
/* Defini o Path de Sistema, sendo sistema, o Framework */
define( 'SYS_PATH', dirname(__FILE__) );
$pathinfo = pathinfo(SYS_PATH);
/* carrega as configurações pertencentes ao Framework */
require_once SYS_PATH.'/Config/system.conf.php';
/*
Esta é a função de autoload dos objetos do FrameWork e
também dos objetos do Applications
*/
function _autoload_($name) {
global $pathinfo;
$searchpath = explode('\\', $name);
$name = array_pop( $searchpath );
$searchpath = $pathinfo['dirname']."/".implode('/',$searchpath)."/";
try{
if(file_exists("{$searchpath}{$name}.php")){
require_once("{$searchpath}{$name}.php");
}
}catch(Exception $E){
\BlueSeed\View::render('system_notfound');
}
}
/* registrar a função de autoload */
spl_autoload_register('_autoload_');