1 | 2 | simandl | <?php |
2 | | | |
3 | | | /* |
4 | | | * This file contains basic configuration of the framework. |
5 | | | * In most cases there is no need for changes in this file unless |
6 | | | * you want to modify framework core |
7 | | | * and maybe brake compatibility with the trunk. |
8 | | | * |
9 | | | * All application specific settings can be done in application.conf.php. |
10 | | | */ |
11 | | | |
12 | | | /* Directory separator */ |
13 | | | if (!defined("DS")) |
14 | | | { |
15 | | | define("DS", "/"); |
16 | | | } |
17 | | | |
18 | | | define("ABSOLUTE_PATH", __DIR__); |
19 | | | |
20 | | | define("FRAMEWORK_EXEC", true); |
21 | | | define("ROOT_NAMESPACE", "Phem"); |
22 | | | if(!defined("ROOT_DIR")) |
23 | | | { |
24 | | | define("ROOT_DIR", '.'); |
25 | | | } |
26 | | | define("FRAMEWORK_DIR", ROOT_DIR.DS."Framework"); |
27 | | | /* Directory with 3rd party libraries */ |
28 | | | define("THIRD_PARTY_DIR", FRAMEWORK_DIR . DS . "3rdParty"); |
29 | | | |
30 | | | /* Running environment directory */ |
31 | | | if (!defined("RUN_DIR")) |
32 | | | { |
33 | | | define("RUN_DIR", ROOT_DIR.DS.'Run'); |
34 | | | } |
35 | | | |
36 | | | /* Proxy directories */ |
37 | | | define("PROXY_DIR", RUN_DIR . DS . 'Proxy'); |
38 | | | define("DOCTRINE_PROXY_DIR", PROXY_DIR . DS . 'Doctrine'); |
39 | | | |
40 | | | /* Cache directories */ |
41 | | | define("CACHE_DIR", RUN_DIR . DS . 'Cache'); |
42 | | | define("TEMPLATE_CACHE_DIR", CACHE_DIR . DS . 'Twig'); |
43 | | | |
44 | | | define("CONTROLLER_SUFFIX", "Controller"); |
45 | | | define("CONTROLLER_ROUTE_ATTR", "controller"); |
46 | | | define("TASK_ROUTE_ATTR", "task"); |
47 | | | |
48 | | | define("DISPATCHER_CONTROLLER_NAME", "Dispatcher"); |
49 | | | define("DISPATCHER_LOGIN_TASK_NAME", "login"); |
50 | | | define("DISPATCHER_DENIED_ACCESS_TASK_NAME", "showAccessDenied"); |
51 | | | |
52 | | | define("BOOTSTRAPER_SUFFIX", "Boot"); |
53 | | | define("RESOURCELOADER_SUFFIX", "Loader"); |
54 | | | |
55 | | | define("BUILTIN_RESOURCES_DIR", 'Resources'); |
56 | | | define("BUILTIN_TEMPLATES_DIR", 'templates'); |
57 | | | define("BUILTIN_CSS_DIR", 'css'); |
58 | | | define("BUILTIN_JS_DIR", 'javascript'); |
59 | | | define("BUILTIN_THIRD_PARTY_RES_DIR", '3rdParty');\ |
60 | | | |
61 | | | define("BUILTIN_TEMPLATES_NAMESPACE", 'Phem'); |
62 | | | |
63 | | | if (array_key_exists("HTTP_HOST",$_SERVER)) |
64 | | | { |
65 | | | define("HOST_URL","http://".$_SERVER["HTTP_HOST"]); |
66 | | | } |
67 | | | else |
68 | | | { |
69 | | | define("HOST_URL","http://localhost"); |
70 | | | } |