Subversion-Projekte lars-tiefland.cakephp

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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