Ejemplo n.º 1
0
/**
 * Main app object
 * 
 * @package Core
 * @category Main
 * @copyright Copyright (c) 2010 Hettema&Bergsten
 * @author      
 */
define('DS', DIRECTORY_SEPARATOR);
define('PS', PATH_SEPARATOR);
define('BP', dirname(dirname(__FILE__)));
ini_set('display_errors', 1);
ini_set("default_charset", App_Main::CHARSET);
date_default_timezone_set(App_Main::DEFAULT_TIMEZONE);
// Set include path
App_Main::register('original_include_path', get_include_path());
// Set the application level include path
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
$paths[] = BP . DS . 'lib';
$app_path = implode(PS, $paths);
set_include_path($app_path . PS . App_Main::registry('original_include_path'));
// Load config file
include 'etc' . DS . 'config.php';
//Load common functions and class autoloader
include 'Core' . DS . 'functions.php';
/**
 * class App_Main
 * Public static methods for the application
 * 
 * @package Core