handlePhpNotice($errno, $errstr, $errfile, $errline); return true; } /** * Catches exceptions and forwards as errors * * @global ErrorGuru $gf_error * @param Exception $ex */ function gf_ex_callback($ex) { global $gf_error; $gf_error->createWarning("Uncaught exception -> " . $ex->getMessage()); } /** * mandatory classes */ $start = microtime(true); include $gf_path . "GuruFactor/classes/Design/SingletonGuru.php"; include $gf_path . "GuruFactor/classes/Design/FactoryGuru.php"; include $gf_path . "GuruFactor/classes/Design/EventGuru.php"; include $gf_path . "GuruFactor/classes/Design/SystemGuru.php"; include $gf_path . "GuruFactor/classes/Design/interfaces/iChainGuru.php"; include $gf_path . "GuruFactor/classes/Design/interfaces/iAccessGuru.php"; include $gf_path . "GuruFactor/classes/Sql/interfaces/iSqlChainGuru.php"; include $gf_path . "GuruFactor/classes/Design/ChainGuru.abstract.php"; include $gf_path . "GuruFactor/classes/Design/SqlChainGuru.abstract.php"; include $gf_path . "GuruFactor/classes/Design/MasterGuru.abstract.php"; include $gf_path . "GuruFactor/classes/Design/WorkerGuru.abstract.php"; include $gf_path . "GuruFactor/classes/Error/ErrorGuru.php"; include $gf_path . "GuruFactor/classes/Site/StatsGuru.php"; include $gf_path . "GuruFactor/classes/Site/DispatcherGuru.php"; include $gf_path . "GuruFactor/classes/Site/LoaderGuru.php"; DispatcherGuru::setPath($gf_path); SYSTEMGURU::loadConstants(); $gf_factory = FactoryGuru::getSelfInstance(); $gf_singleton = SingletonGuru::getSelfInstance(); $gf_loader = $gf_factory->get("LoaderGuru"); $gf_stats = $gf_factory->get("StatsGuru"); $gf_event = $gf_factory->get("EventGuru"); $gf_error = $gf_factory->get("ErrorGuru"); $gf_loader->instanceRegistry('$gf_stats'); $gf_loader->instanceRegistry('$gf_event'); $gf_loader->instanceRegistry('$gf_factory'); $gf_loader->instanceRegistry('$gf_singleton'); $gf_loader->instanceRegistry('$gf_error'); /** * Initialize system */ SYSTEMGURU::INIT(); /** * autoload hadler, when a not yet defined class is called */ spl_autoload_register("SYSTEMGURU::AUTOLOADER"); $gf_error = $gf_factory->get("ErrorGuru"); /* /** * REGISTERS THE ERROR HANDLER FUNCTION */ set_error_handler("gf_err_callback"); /** * REGISTERS THE EXCEPTIONS HANDLE */ if (function_exists("set_exception_handler")) set_exception_handler("gf_ex_callback"); SYSTEMGURU::LOAD_MICRO_FRAMEWORK(); $gf_factory->get("HttpGuru")->initData(); $gf_end_time = microtime(true); $gf_stats->server['gf_load'] = $gf_end_time - $gf_start_time; // framework load time /** * Extract relay variables from url */ DispatcherGuru::setDispatchVariables();