* Handles loading of core files needed on every request * * PHP Version 5.x * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } error_reporting(E_ALL & ~E_DEPRECATED); require CORE_PATH . 'cake' . DS . 'basics.php'; $TIME_START = microtime(true); require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php'; require LIBS . 'object.php'; require LIBS . 'inflector.php'; require LIBS . 'configure.php'; require LIBS . 'set.php'; require LIBS . 'cache.php'; Configure::init(); require CAKE . 'dispatcher.php';
/** * Initializes the environment and loads the Cake core. * * @return boolean Success. * @access private */ function __bootstrap() { define('ROOT', $this->params['root']); define('APP_DIR', $this->params['app']); define('APP_PATH', $this->params['working'] . DS); define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS); $includes = array(CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'object.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'inflector.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'configure.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'file.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'cache.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'string.php', CORE_PATH . 'cake' . DS . 'libs' . DS . 'class_registry.php', CORE_PATH . 'cake' . DS . 'console' . DS . 'error.php'); foreach ($includes as $inc) { if (!(require $inc)) { $this->stderr("Failed to load Cake core file {$inc}"); return false; } } Configure::init(file_exists(CONFIGS . 'bootstrap.php')); if (!file_exists(APP_PATH . 'config' . DS . 'core.php')) { include_once CORE_PATH . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php'; App::build(); } Configure::write('debug', 1); return true; }