mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
443a702376
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()? Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself? - I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices. - /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php). - Some cleanups in the Controller and Dispatcher classes. - DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory. - I think I've added some comments to DBO sub-classes, but it might have been Olle. - A fix in Model class (findAll didn't work properly) - Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references). git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
117 lines
2.8 KiB
PHP
117 lines
2.8 KiB
PHP
<?PHP
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// + $Id$
|
|
// +------------------------------------------------------------------+ //
|
|
// + Cake <https://developers.nextco.com/cake/> + //
|
|
// + Copyright: (c) 2005, Cake Authors/Developers + //
|
|
// +------------------------------------------------------------------+ //
|
|
// + Licensed under The MIT License + //
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
* In this file you set paths to different directories used by Cake.
|
|
*/
|
|
|
|
/**
|
|
* If the index.php file is used instead of an .htaccess file
|
|
* or if the user can not set the web root to use the public
|
|
* directory we will define ROOT there, otherwise we set it
|
|
* here.
|
|
*/
|
|
if( !defined('ROOT') ){
|
|
define ('ROOT', '../');
|
|
}
|
|
|
|
/**
|
|
* Path to the application's directory.
|
|
*/
|
|
define ('APP', ROOT.'app'.DS);
|
|
|
|
/**
|
|
* Path to the application's models directory.
|
|
*/
|
|
define ('MODELS', APP.'models'.DS);
|
|
|
|
/**
|
|
* Path to the application's controllers directory.
|
|
*/
|
|
define ('CONTROLLERS', APP.'controllers'.DS);
|
|
|
|
/**
|
|
* Path to the application's helpers directory.
|
|
*/
|
|
define ('HELPERS', APP.'helpers'.DS);
|
|
|
|
/**
|
|
* Path to the application's views directory.
|
|
*/
|
|
define ('VIEWS', APP.'views'.DS);
|
|
|
|
/**
|
|
* Path to the application's view's layouts directory.
|
|
*/
|
|
define ('LAYOUTS', APP.'views'.DS.'layouts'.DS);
|
|
|
|
/**
|
|
* Path to the application's view's elements directory.
|
|
* It's supposed to hold pieces of PHP/HTML that are used on multiple pages
|
|
* and are not linked to a particular layout (like polls, footers and so on).
|
|
*/
|
|
define ('ELEMENTS', APP.'views'.DS.'elements'.DS);
|
|
|
|
/**
|
|
* Path to the configuration files directory.
|
|
*/
|
|
define ('CONFIGS', ROOT.'config'.DS);
|
|
|
|
/**
|
|
* Path to the libs directory.
|
|
*/
|
|
define ('LIBS', ROOT.'libs'.DS);
|
|
|
|
/**
|
|
* Path to the logs directory.
|
|
*/
|
|
define ('LOGS', ROOT.'logs'.DS);
|
|
|
|
/**
|
|
* Path to the modules directory.
|
|
*/
|
|
define ('MODULES', ROOT.'modules'.DS);
|
|
|
|
/**
|
|
* Path to the public directory.
|
|
*/
|
|
define ('PUBLIC', ROOT.'public'.DS);
|
|
|
|
/**
|
|
* Path to the tests directory.
|
|
*/
|
|
define ('TESTS', ROOT.'tests'.DS);
|
|
|
|
/**
|
|
* Path to the vendors directory.
|
|
*/
|
|
define ('VENDORS', ROOT.'vendors'.DS);
|
|
|
|
/**
|
|
* Path to the controller test directory.
|
|
*/
|
|
define ('CONTROLLER_TESTS',TESTS.'app'.DS.'controllers'.DS);
|
|
|
|
/**
|
|
* Path to the helpers test directory.
|
|
*/
|
|
define ('HELPER_TESTS', TESTS.'app'.DS.'helpers'.DS);
|
|
|
|
/**
|
|
* Path to the models' test directory.
|
|
*/
|
|
define ('MODEL_TESTS', TESTS.'app'.DS.'models'.DS);
|
|
|
|
/**
|
|
* Path to the lib test directory.
|
|
*/
|
|
define ('LIB_TESTS', TESTS.'libs'.DS);
|
|
|
|
?>
|