2007-09-30 20:07:10 +00:00
|
|
|
<?php
|
2006-01-17 05:13:38 +00:00
|
|
|
/* SVN FILE: $Id$ */
|
|
|
|
/**
|
|
|
|
* Basic Cake functionality.
|
|
|
|
*
|
|
|
|
* Core functions for including other source files, loading models and so forth.
|
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
2007-02-02 10:39:45 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
|
|
|
|
* Copyright 2005-2007, Cake Software Foundation, Inc.
|
2006-05-26 05:29:17 +00:00
|
|
|
* 1785 E. Sahara Avenue, Suite 490-204
|
|
|
|
* Las Vegas, Nevada 89104
|
2006-01-17 05:13:38 +00:00
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
|
|
|
* @filesource
|
2007-02-02 10:39:45 +00:00
|
|
|
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
|
|
|
|
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
2006-05-26 05:29:17 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake
|
2007-02-02 10:39:45 +00:00
|
|
|
* @since CakePHP(tm) v 0.2.9
|
2006-05-26 05:29:17 +00:00
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
2006-01-17 05:13:38 +00:00
|
|
|
*/
|
2006-08-06 18:00:49 +00:00
|
|
|
if (!defined('PHP5')) {
|
2006-08-08 16:38:02 +00:00
|
|
|
define ('PHP5', (phpversion() >= 5));
|
2006-08-06 18:00:49 +00:00
|
|
|
}
|
2007-09-30 07:45:34 +00:00
|
|
|
if (!defined('SERVER_IIS') && php_sapi_name() == 'isapi') {
|
|
|
|
define('SERVER_IIS', true);
|
|
|
|
}
|
2006-01-17 05:13:38 +00:00
|
|
|
/**
|
|
|
|
* Configuration, directory layout and standard libraries
|
|
|
|
*/
|
2006-05-26 05:29:17 +00:00
|
|
|
if (!isset($bootstrap)) {
|
|
|
|
require CORE_PATH . 'cake' . DS . 'basics.php';
|
2007-08-05 02:03:18 +00:00
|
|
|
$TIME_START = getMicrotime();
|
2006-05-26 05:29:17 +00:00
|
|
|
require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
|
2007-07-25 04:38:28 +00:00
|
|
|
require LIBS . 'object.php';
|
2007-08-16 08:39:12 +00:00
|
|
|
require LIBS . 'inflector.php';
|
2007-07-25 04:38:28 +00:00
|
|
|
require LIBS . 'configure.php';
|
2006-05-26 05:29:17 +00:00
|
|
|
}
|
Closes #2119 Only define clone() in PHP4 when it hasn't been already defined.
Closes #2213, Support multiple plugin paths.
Closes #2234, filepaths to behavior classes should be cached in class.paths.php also
Closes #2345, ability to group components into subfolders
Closes #2645, Improvement to basic.php for class loading.
Fixes #3526, Cache::write, when using just the config name, it fails.
Fixes #3559, loading plugin model as assoc don't work.
Closes #3567 Controller Folders (Note this does not need routing to work, but controller names can not conflict with others in the same application so naming must still be unique)
Fixes #3579, email.php component: Parse error with php 4.
Adding new class and file importer.
Updated most of the core to use the importer.
Added ClassRegsitry::init() that will create and instance of an object and store it in the registry.
Deprecated most of the load functions in basics.php
Plugin model loading now forces using the dot notation, to use models within a plugin, all the model associations must be in the PluginName.Model syntax, if this is not used, the plugin will look for the models in the main app/models directory first, if not found then it will search the plugin directories recursively until it finds a model.
var $belongsTo = array('SomeModel'); will look for some_model.php in the app/models
var $belongsTo = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $belongsTo = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
The controllers of the plugin will still look for the default models inside the plugin if var $uses is not set:
var $uses = array('SomeModel'); will look for some_model.php in the app/models
var $uses = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $uses = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
All of the above will work between plugins and main app
These changes also allow placing model and controllers is sub directories
Removed old class.paths.php file generation
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6001 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-16 09:35:19 +00:00
|
|
|
require LIBS . 'file.php';
|
2007-04-30 07:38:47 +00:00
|
|
|
require LIBS . 'cache.php';
|
2007-10-22 16:04:04 +00:00
|
|
|
|
2007-10-14 01:09:21 +00:00
|
|
|
Configure::getInstance();
|
2007-10-22 16:04:04 +00:00
|
|
|
|
2006-05-26 05:29:17 +00:00
|
|
|
require LIBS . 'session.php';
|
|
|
|
require LIBS . 'security.php';
|
2007-08-20 01:58:44 +00:00
|
|
|
require LIBS . 'string.php';
|
2007-04-30 07:38:47 +00:00
|
|
|
|
2007-08-05 02:03:18 +00:00
|
|
|
$url = null;
|
2006-05-26 05:29:17 +00:00
|
|
|
require CAKE . 'dispatcher.php';
|
2006-01-17 05:13:38 +00:00
|
|
|
?>
|