示例#1
0
文件: Boot.php 项目: point/cassea
/**
 * Require some common files and classes
 */
require "functions.php";
//require("exceptions.php");
//require("interfaces.php");
require "env/Loader.php";
require "Config.php";
require 'Autoload.php';
require 'ErrorsHandler.php';
/**
 * Setup errors and exceptions handlers.
 *
 * @see ErrorsHandler
 */
ErrorsHandler::setup();
/**
 * Init config with CONFIG and CONFIG_SECTION constants
 * If they are not defined, "config.ini" and "config" are used instead.
 * In current implementation use IniDBConfig only
 */
Config::init(new IniDBConfig());
/**
 * Init helper class to lookup and include classes. One class per file is allowed.
 * Name of the file must be the same as class name.
 */
Autoload::init();
/**
 * Connect to database. All parameters defined in configuration file
 */
DB::init(Config::getInstance()->db);