Mercurial > hg > Members > shoshi > webvirt
comparison cake/config/paths.php @ 0:261e66bd5a0c
hg init
author | Shoshi TAMAKI <shoshi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 24 Jul 2011 21:08:31 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:261e66bd5a0c |
---|---|
1 <?php | |
2 /** | |
3 * Path configuration | |
4 * | |
5 * In this file you set paths to different directories used by Cake. | |
6 * | |
7 * PHP versions 4 and 5 | |
8 * | |
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
10 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
11 * | |
12 * Licensed under The MIT License | |
13 * Redistributions of files must retain the above copyright notice. | |
14 * | |
15 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
16 * @link http://cakephp.org CakePHP(tm) Project | |
17 * @package cake | |
18 * @subpackage cake.cake.app.config | |
19 * @since CakePHP(tm) v 0.2.9 | |
20 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
21 */ | |
22 | |
23 /** | |
24 * If the index.php file is used instead of an .htaccess file | |
25 * or if the user can not set the web root to use the public | |
26 * directory we will define ROOT there, otherwise we set it | |
27 * here. | |
28 */ | |
29 if (!defined('ROOT')) { | |
30 define('ROOT', '../'); | |
31 } | |
32 if (!defined('WEBROOT_DIR')) { | |
33 define('WEBROOT_DIR', 'webroot'); | |
34 } | |
35 | |
36 /** | |
37 * Path to the cake directory. | |
38 */ | |
39 define('CAKE', CORE_PATH.'cake'.DS); | |
40 | |
41 /** | |
42 * Path to the application's directory. | |
43 */ | |
44 if (!defined('APP')) { | |
45 define('APP', ROOT.DS.APP_DIR.DS); | |
46 } | |
47 | |
48 /** | |
49 * Path to the application's models directory. | |
50 */ | |
51 define('MODELS', APP.'models'.DS); | |
52 | |
53 /** | |
54 * Path to model behaviors directory. | |
55 */ | |
56 define('BEHAVIORS', MODELS.'behaviors'.DS); | |
57 | |
58 /** | |
59 * Path to the application's controllers directory. | |
60 */ | |
61 define('CONTROLLERS', APP.'controllers'.DS); | |
62 | |
63 /** | |
64 * Path to the application's components directory. | |
65 */ | |
66 define('COMPONENTS', CONTROLLERS.'components'.DS); | |
67 | |
68 /** | |
69 * Path to the application's libs directory. | |
70 */ | |
71 define('APPLIBS', APP.'libs'.DS); | |
72 | |
73 /** | |
74 * Path to the application's views directory. | |
75 */ | |
76 define('VIEWS', APP.'views'.DS); | |
77 | |
78 /** | |
79 * Path to the application's helpers directory. | |
80 */ | |
81 define('HELPERS', VIEWS.'helpers'.DS); | |
82 | |
83 /** | |
84 * Path to the application's view's layouts directory. | |
85 */ | |
86 define('LAYOUTS', VIEWS.'layouts'.DS); | |
87 | |
88 /** | |
89 * Path to the application's view's elements directory. | |
90 * It's supposed to hold pieces of PHP/HTML that are used on multiple pages | |
91 * and are not linked to a particular layout (like polls, footers and so on). | |
92 */ | |
93 define('ELEMENTS', VIEWS.'elements'.DS); | |
94 | |
95 /** | |
96 * Path to the configuration files directory. | |
97 */ | |
98 if (!defined('CONFIGS')) { | |
99 define('CONFIGS', APP.'config'.DS); | |
100 } | |
101 | |
102 /** | |
103 * Path to the libs directory. | |
104 */ | |
105 define('LIBS', CAKE.'libs'.DS); | |
106 | |
107 /** | |
108 * Path to the public CSS directory. | |
109 */ | |
110 define('CSS', WWW_ROOT.'css'.DS); | |
111 | |
112 /** | |
113 * Path to the public JavaScript directory. | |
114 */ | |
115 define('JS', WWW_ROOT.'js'.DS); | |
116 | |
117 /** | |
118 * Path to the public images directory. | |
119 */ | |
120 define('IMAGES', WWW_ROOT.'img'.DS); | |
121 | |
122 /** | |
123 * Path to the console libs direcotry. | |
124 */ | |
125 define('CONSOLE_LIBS', CAKE.'console'.DS.'libs'.DS); | |
126 | |
127 /** | |
128 * Path to the tests directory. | |
129 */ | |
130 if (!defined('TESTS')) { | |
131 define('TESTS', APP.'tests'.DS); | |
132 } | |
133 | |
134 /** | |
135 * Path to the core tests directory. | |
136 */ | |
137 if (!defined('CAKE_TESTS')) { | |
138 define('CAKE_TESTS', CAKE.'tests'.DS); | |
139 } | |
140 | |
141 /** | |
142 * Path to the test suite. | |
143 */ | |
144 define('CAKE_TESTS_LIB', CAKE_TESTS.'lib'.DS); | |
145 | |
146 /** | |
147 * Path to the controller test directory. | |
148 */ | |
149 define('CONTROLLER_TESTS', TESTS.'cases'.DS.'controllers'.DS); | |
150 | |
151 /** | |
152 * Path to the components test directory. | |
153 */ | |
154 define('COMPONENT_TESTS', TESTS.'cases'.DS.'components'.DS); | |
155 | |
156 /** | |
157 * Path to the helpers test directory. | |
158 */ | |
159 define('HELPER_TESTS', TESTS.'cases'.DS.'views'.DS.'helpers'.DS); | |
160 | |
161 /** | |
162 * Path to the models' test directory. | |
163 */ | |
164 define('MODEL_TESTS', TESTS.'cases'.DS.'models'.DS); | |
165 | |
166 /** | |
167 * Path to the lib test directory. | |
168 */ | |
169 define('LIB_TESTS', CAKE_TESTS.'cases'.DS.'lib'.DS); | |
170 | |
171 /** | |
172 * Path to the temporary files directory. | |
173 */ | |
174 if (!defined('TMP')) { | |
175 define('TMP', APP.'tmp'.DS); | |
176 } | |
177 | |
178 /** | |
179 * Path to the logs directory. | |
180 */ | |
181 define('LOGS', TMP.'logs'.DS); | |
182 | |
183 /** | |
184 * Path to the cache files directory. It can be shared between hosts in a multi-server setup. | |
185 */ | |
186 define('CACHE', TMP.'cache'.DS); | |
187 | |
188 /** | |
189 * Path to the vendors directory. | |
190 */ | |
191 if (!defined('VENDORS')) { | |
192 define('VENDORS', CAKE_CORE_INCLUDE_PATH.DS.'vendors'.DS); | |
193 } | |
194 | |
195 /** | |
196 * Full url prefix | |
197 */ | |
198 if (!defined('FULL_BASE_URL')) { | |
199 $s = null; | |
200 if (env('HTTPS')) { | |
201 $s ='s'; | |
202 } | |
203 | |
204 $httpHost = env('HTTP_HOST'); | |
205 | |
206 if (isset($httpHost)) { | |
207 define('FULL_BASE_URL', 'http'.$s.'://'.$httpHost); | |
208 } | |
209 unset($httpHost, $s); | |
210 } | |
211 | |
212 /** | |
213 * Web path to the public images directory. | |
214 */ | |
215 if (!defined('IMAGES_URL')) { | |
216 define('IMAGES_URL', 'img/'); | |
217 } | |
218 | |
219 /** | |
220 * Web path to the CSS files directory. | |
221 */ | |
222 if (!defined('CSS_URL')) { | |
223 define('CSS_URL', 'css/'); | |
224 } | |
225 | |
226 /** | |
227 * Web path to the js files directory. | |
228 */ | |
229 if (!defined('JS_URL')) { | |
230 define('JS_URL', 'js/'); | |
231 } |