paths.php

Go to the documentation of this file.
00001 <?php
00002 /* SVN FILE: $Id: paths.php 7847 2008-11-08 02:54:07Z renan.saddam $ */
00003 /**
00004  * Short description for file.
00005  *
00006  * In this file you set paths to different directories used by Cake.
00007  *
00008  * PHP versions 4 and 5
00009  *
00010  * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
00011  * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
00012  *
00013  * Licensed under The MIT License
00014  * Redistributions of files must retain the above copyright notice.
00015  *
00016  * @filesource
00017  * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
00018  * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
00019  * @package       cake
00020  * @subpackage    cake.cake.app.config
00021  * @since         CakePHP(tm) v 0.2.9
00022  * @version       $Revision: 7847 $
00023  * @modifiedby    $LastChangedBy: renan.saddam $
00024  * @lastmodified  $Date: 2008-11-07 21:54:07 -0500 (Fri, 07 Nov 2008) $
00025  * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
00026  */
00027 /**
00028  * If the index.php file is used instead of an .htaccess file
00029  * or if the user can not set the web root to use the public
00030  * directory we will define ROOT there, otherwise we set it
00031  * here.
00032  */
00033     if (!defined('ROOT')) {
00034         define('ROOT', '../');
00035     }
00036     if (!defined('WEBROOT_DIR')) {
00037         define('WEBROOT_DIR', 'webroot');
00038     }
00039 /**
00040  * Path to the cake directory.
00041  */
00042     define('CAKE', CORE_PATH.'cake'.DS);
00043 /**
00044  * Path to the application's directory.
00045  */
00046 if (!defined('APP')) {
00047     define('APP', ROOT.DS.APP_DIR.DS);
00048 }
00049 /**
00050  * Path to the application's models directory.
00051  */
00052     define('MODELS', APP.'models'.DS);
00053 /**
00054  * Path to model behaviors directory.
00055  */
00056     define('BEHAVIORS', MODELS.'behaviors'.DS);
00057 /**
00058  * Path to the application's controllers directory.
00059  */
00060     define('CONTROLLERS', APP.'controllers'.DS);
00061 /**
00062  * Path to the application's components directory.
00063  */
00064     define('COMPONENTS', CONTROLLERS.'components'.DS);
00065 /**
00066  * Path to the application's views directory.
00067  */
00068     define('VIEWS', APP.'views'.DS);
00069 /**
00070  * Path to the application's helpers directory.
00071  */
00072     define('HELPERS', VIEWS.'helpers'.DS);
00073 /**
00074  * Path to the application's view's layouts directory.
00075  */
00076     define('LAYOUTS', VIEWS.'layouts'.DS);
00077 /**
00078  * Path to the application's view's elements directory.
00079  * It's supposed to hold pieces of PHP/HTML that are used on multiple pages
00080  * and are not linked to a particular layout (like polls, footers and so on).
00081  */
00082     define('ELEMENTS', VIEWS.'elements'.DS);
00083 /**
00084  * Path to the configuration files directory.
00085  */
00086 if (!defined('CONFIGS')) {
00087     define('CONFIGS', APP.'config'.DS);
00088 }
00089 /**
00090  * Path to the libs directory.
00091  */
00092     define('INFLECTIONS', CAKE.'config'.DS.'inflections'.DS);
00093 /**
00094  * Path to the libs directory.
00095  */
00096     define('LIBS', CAKE.'libs'.DS);
00097 /**
00098  * Path to the public CSS directory.
00099  */
00100     define('CSS', WWW_ROOT.'css'.DS);
00101 /**
00102  * Path to the public JavaScript directory.
00103  */
00104     define('JS', WWW_ROOT.'js'.DS);
00105 /**
00106  * Path to the public images directory.
00107  */
00108     define('IMAGES', WWW_ROOT.'img'.DS);
00109 /**
00110  * Path to the console libs direcotry.
00111  */
00112     define('CONSOLE_LIBS', CAKE.'console'.DS.'libs'.DS);
00113 /**
00114  * Path to the tests directory.
00115  */
00116 if (!defined('TESTS')) {
00117     define('TESTS', APP.'tests'.DS);
00118 }
00119 /**
00120  * Path to the core tests directory.
00121  */
00122 if (!defined('CAKE_TESTS')) {
00123     define('CAKE_TESTS', CAKE.'tests'.DS);
00124 }
00125 /**
00126  * Path to the test suite.
00127  */
00128     define('CAKE_TESTS_LIB', CAKE_TESTS.'lib'.DS);
00129 
00130 /**
00131  * Path to the controller test directory.
00132  */
00133     define('CONTROLLER_TESTS', TESTS.'cases'.DS.'controllers'.DS);
00134 /**
00135  * Path to the components test directory.
00136  */
00137     define('COMPONENT_TESTS', TESTS.'cases'.DS.'components'.DS);
00138 /**
00139  * Path to the helpers test directory.
00140  */
00141     define('HELPER_TESTS', TESTS.'cases'.DS.'views'.DS.'helpers'.DS);
00142 /**
00143  * Path to the models' test directory.
00144  */
00145     define('MODEL_TESTS', TESTS.'cases'.DS.'models'.DS);
00146 /**
00147  * Path to the lib test directory.
00148  */
00149     define('LIB_TESTS', CAKE_TESTS.'cases'.DS.'lib'.DS);
00150 /**
00151  * Path to the temporary files directory.
00152  */
00153 if (!defined('TMP')) {
00154     define('TMP', APP.'tmp'.DS);
00155 }
00156 /**
00157  * Path to the logs directory.
00158  */
00159     define('LOGS', TMP.'logs'.DS);
00160 /**
00161  * Path to the cache files directory. It can be shared between hosts in a multi-server setup.
00162  */
00163     define('CACHE', TMP.'cache'.DS);
00164 /**
00165  * Path to the vendors directory.
00166  */
00167 if (!defined('VENDORS')) {
00168     define('VENDORS', CAKE_CORE_INCLUDE_PATH.DS.'vendors'.DS);
00169 }
00170 /**
00171  * Path to the Pear directory
00172  * The purporse is to make it easy porting Pear libs into Cake
00173  * without setting the include_path PHP variable.
00174  */
00175     define('PEAR', VENDORS.'Pear'.DS);
00176 /**
00177  *  Full url prefix
00178  */
00179 if (!defined('FULL_BASE_URL')) {
00180     $s = null;
00181     if (env('HTTPS')) {
00182         $s ='s';
00183     }
00184 
00185     $httpHost = env('HTTP_HOST');
00186 
00187     if (isset($httpHost)) {
00188         define('FULL_BASE_URL', 'http'.$s.'://'.$httpHost);
00189     }
00190     unset($httpHost, $s);
00191 }
00192 /**
00193  * Web path to the public images directory.
00194  */
00195 if (!defined('IMAGES_URL')) {
00196     define('IMAGES_URL', 'img/');
00197 }
00198 /**
00199  * Web path to the CSS files directory.
00200  */
00201 if (!defined('CSS_URL')) {
00202     define('CSS_URL', 'css/');
00203 }
00204 /**
00205  * Web path to the js files directory.
00206  */
00207 if (!defined('JS_URL')) {
00208     define('JS_URL', 'js/');
00209 }
00210 ?>

Generated on Sun Nov 22 00:30:50 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7