Exemplo n.º 1
0
    error_reporting(0);
}
//check PHP version
if (version_compare(phpversion(), '5.4', '<')) {
    header('Content-type: text/html');
    include APP_PATH . '/phpversion.phtml';
    exit;
}
//xdebug profiler
//setcookie('XDEBUG_PROFILE', 1, time()+1800);
//setcookie('XDEBUG_PROFILE', '', time()-1800);
//core
require APP_PATH . '/vendors/thcframe/core/core.php';
THCFrame\Core\Core::initialize();
//plugins
$path = APP_PATH . '/application/plugins';
$iterator = new \DirectoryIterator($path);
foreach ($iterator as $item) {
    if (!$item->isDot() && $item->isDir()) {
        include $path . '/' . $item->getFilename() . '/initialize.php';
    }
}
//register modules
$modules = array('App', 'Admin');
THCFrame\Core\Core::registerModules($modules);
//internal profiler
$profiler = \THCFrame\Profiler\Profiler::getInstance();
$profiler->start();
// load services and run dispatcher
THCFrame\Core\Core::run();